Re: cdc_ncm kernel log spam with trendnet 2.5G USB adapter
From: Oliver Neukum <oneukum@suse.com>
Date: 2020-11-26 12:06:21
Also in:
linux-usb
From: Oliver Neukum <oneukum@suse.com>
Date: 2020-11-26 12:06:21
Also in:
linux-usb
Am Montag, den 16.11.2020, 09:23 -0800 schrieb Roland Dreier:
Hi, I recently got a 2.5G USB adapter, and although it works fine, the driver continually spams the kernel log with messages like [127662.025647] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: network connection: connected [127662.057680] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: 2500 mbit/s downlink 2500 mbit/s uplink [127662.089794] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: network connection: connected [127662.121831] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: 2500 mbit/s downlink 2500 mbit/s uplink [127662.153858] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: network connection: connected ... Looking at the code in cdc_ncm.c it seems the device is just sending USB_CDC_NOTIFY_NETWORK_CONNECTION and USB_CDC_NOTIFY_SPEED_CHANGE urbs over and over, and the driver logs every single one. Should we add code to the driver to keep track of what the last event was and only log if the state has really change?
Hi, in theory I suppose we could do that, but it would be kind of stupid. Events like these should be reported to higher layers and not logged at all. Regards Oliver