From: Roland Dreier <roland@kernel.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: cdc_ncm kernel log spam with trendnet 2.5G USB adapter
Date: Sat, 19 Dec 2020 14:21:40 -0800 [thread overview]
Message-ID: <20201219222140.4161646-1-roland@kernel.org> (raw)
In-Reply-To: <3a9b2c8c275d56d9c7904cf9b5177047b196173d.camel@neukum.org>
(Apologies, trying one more time with a better mailer)
Sorry it took so long, but I finally got a chance to test the patches. They
seem to work well, but they only get rid of the downlink / uplink speed spam -
I still get the following filling my kernel log with a patched kernel:
[ 29.830383] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
[ 29.894359] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
[ 29.958601] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
[ 30.022473] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
[ 30.086548] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
with the below patch on top of your 3, then my kernel log is clean.
Please apply your patches plus my patch, and feel free to add
Tested-by: Roland Dreier <roland@kernel.org>
to the other three.
--- 8< ---------- 8< ---
Subject: [PATCH] CDC-NCM: remove "connected" log message
The cdc_ncm driver passes network connection notifications up to
usbnet_link_change(), which is the right place for any logging.
Remove the netdev_info() duplicating this from the driver itself.
This stops devices such as my "TRENDnet USB 10/100/1G/2.5G LAN"
(ID 20f4:e02b) adapter from spamming the kernel log with
cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
messages every 60 msec or so.
Signed-off-by: Roland Dreier <roland@kernel.org>
---
drivers/net/usb/cdc_ncm.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index a45fcc44facf..50d3a4e6d445 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1850,9 +1850,6 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
*/
- netif_info(dev, link, dev->net,
- "network connection: %sconnected\n",
- !!event->wValue ? "" : "dis");
usbnet_link_change(dev, !!event->wValue, 0);
break;
--
2.29.2
next prev parent reply other threads:[~2020-12-19 22:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 17:23 cdc_ncm kernel log spam with trendnet 2.5G USB adapter Roland Dreier
2020-11-26 12:05 ` Oliver Neukum
[not found] ` <3a9b2c8c275d56d9c7904cf9b5177047b196173d.camel@neukum.org>
2020-12-01 20:42 ` Roland Dreier
2020-12-19 22:21 ` Roland Dreier [this message]
2020-12-23 2:49 ` Jakub Kicinski
2020-12-23 3:01 ` Roland Dreier
2020-12-24 3:21 ` [PATCH] CDC-NCM: remove "connected" log message Roland Dreier
2020-12-24 7:53 ` Greg KH
2020-12-28 21:30 ` Jakub Kicinski
2020-12-29 7:56 ` Roland Dreier
2020-12-29 12:30 ` Oliver Neukum
[not found] ` <24c6faa2a4f91c721d9a7f14bb7b641b89ae987d.camel@neukum.org>
2020-12-29 19:50 ` Roland Dreier
2020-12-30 11:03 ` Oliver Neukum
2020-12-31 18:51 ` Roland Dreier
2021-01-04 14:57 ` Oliver Neukum
2021-01-04 19:13 ` Roland Dreier
2021-01-05 14:04 ` Oliver Neukum
2021-01-06 0:19 ` Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201219222140.4161646-1-roland@kernel.org \
--to=roland@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).