Files
linux/include/linux
Grant Grundler aaa41b3094 net: usb: cdc_ncm: don't spew notifications
[ Upstream commit de658a195e ]

RTL8156 sends notifications about every 32ms.
Only display/log notifications when something changes.

This issue has been reported by others:
	https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832472
	https://lkml.org/lkml/2020/8/27/1083

...
[785962.779840] usb 1-1: new high-speed USB device number 5 using xhci_hcd
[785962.929944] usb 1-1: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=30.00
[785962.929949] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[785962.929952] usb 1-1: Product: USB 10/100/1G/2.5G LAN
[785962.929954] usb 1-1: Manufacturer: Realtek
[785962.929956] usb 1-1: SerialNumber: 000000001
[785962.991755] usbcore: registered new interface driver cdc_ether
[785963.017068] cdc_ncm 1-1:2.0: MAC-Address: 00:24:27:88:08:15
[785963.017072] cdc_ncm 1-1:2.0: setting rx_max = 16384
[785963.017169] cdc_ncm 1-1:2.0: setting tx_max = 16384
[785963.017682] cdc_ncm 1-1:2.0 usb0: register 'cdc_ncm' at usb-0000:00:14.0-1, CDC NCM, 00:24:27:88:08:15
[785963.019211] usbcore: registered new interface driver cdc_ncm
[785963.023856] usbcore: registered new interface driver cdc_wdm
[785963.025461] usbcore: registered new interface driver cdc_mbim
[785963.038824] cdc_ncm 1-1:2.0 enx002427880815: renamed from usb0
[785963.089586] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected
[785963.121673] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected
[785963.153682] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected
...

This is about 2KB per second and will overwrite all contents of a 1MB
dmesg buffer in under 10 minutes rendering them useless for debugging
many kernel problems.

This is also an extra 180 MB/day in /var/logs (or 1GB per week) rendering
the majority of those logs useless too.

When the link is up (expected state), spew amount is >2x higher:
...
[786139.600992] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected
[786139.632997] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink
[786139.665097] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected
[786139.697100] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink
[786139.729094] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected
[786139.761108] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink
...

Chrome OS cannot support RTL8156 until this is fixed.

Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Hayes Wang <hayeswang@realtek.com>
Link: https://lore.kernel.org/r/20210120011208.3768105-1-grundler@chromium.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-10 13:37:01 +02:00
..
2019-08-09 09:15:05 +02:00
2019-09-17 10:27:46 -07:00
2020-02-19 19:53:09 +01:00
2019-05-31 11:13:10 +02:00
2021-04-14 08:24:17 +02:00
2019-08-20 22:09:52 +02:00
2019-08-28 21:17:12 -06:00
2018-11-07 13:44:59 -07:00
2018-11-07 13:44:59 -07:00
2019-04-09 17:05:46 -07:00
2018-06-15 18:10:01 -03:00
2018-08-22 10:52:48 -07:00
2021-01-23 15:57:55 +01:00
2019-02-28 03:28:53 -05:00
2019-02-28 08:24:23 -07:00
2021-01-30 13:54:11 +01:00
2021-01-06 14:48:35 +01:00
2020-03-25 08:25:58 +01:00
2019-02-15 16:54:38 +01:00
2019-09-05 11:40:54 +02:00
2019-10-02 06:36:50 -07:00
2019-07-05 21:34:50 +02:00
2019-06-26 13:19:46 -07:00
2021-05-19 10:08:30 +02:00
2018-11-19 19:03:46 -07:00
2018-06-22 13:43:27 +09:00
2019-06-10 13:00:24 +02:00
2019-04-08 22:56:14 +02:00
2019-09-07 04:28:05 -03:00
2019-12-13 08:42:53 +01:00
2021-03-04 10:26:29 +01:00
2021-02-07 15:35:49 +01:00
2018-07-12 21:35:28 +02:00
2019-03-07 18:32:03 -08:00
2019-09-05 12:32:05 +02:00
2018-06-07 17:34:35 -07:00
2019-12-13 08:43:18 +01:00
2021-05-19 10:08:29 +02:00
2020-07-29 10:18:36 +02:00
2019-08-14 15:30:35 +02:00
2018-10-17 13:56:58 -07:00
2019-06-13 09:02:33 -04:00
2019-02-20 07:22:17 -07:00
2019-02-20 07:22:10 -07:00
2018-12-06 15:45:46 +01:00
2019-02-08 15:02:49 -08:00
2018-07-10 17:22:35 +02:00
2018-06-07 17:34:36 -07:00
2018-10-21 10:46:39 -04:00
2019-07-16 19:23:25 -07:00
2020-03-18 07:17:46 +01:00
2019-08-01 21:49:46 +02:00
2018-10-08 22:53:10 +11:00
2019-06-15 12:25:49 +02:00
2019-05-14 19:52:48 -07:00
2018-07-20 01:11:45 +02:00
2019-07-31 19:03:35 +02:00
2019-05-08 22:14:36 +02:00
2018-09-25 20:17:35 -07:00
2020-04-17 10:50:12 +02:00
2020-04-02 15:11:00 +02:00
2019-05-31 12:37:46 -07:00
2019-05-16 15:51:55 -07:00
2018-07-07 17:25:23 +02:00
2019-10-31 14:01:40 -07:00
2019-02-07 16:38:35 +01:00
2018-06-20 11:35:56 +02:00
2021-03-07 12:20:49 +01:00
2019-09-07 21:42:25 +02:00
2018-10-11 09:16:44 -07:00
2019-02-07 00:13:27 +01:00
2019-08-01 20:51:22 +02:00
2019-07-31 19:03:35 +02:00
2020-12-11 13:23:28 +01:00
2019-01-11 18:05:40 -08:00
2020-04-02 15:11:00 +02:00
2019-05-15 17:35:54 +01:00
2018-12-22 12:15:29 +01:00