linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@chromium.org>
To: Oliver Neukum <oneukum@suse.com>, Jakub Kicinski <kuba@kernel.org>
Cc: Roland Dreier <roland@kernel.org>,
	nic_swsd <nic_swsd@realtek.com>, netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Grant Grundler <grundler@chromium.org>
Subject: [PATCH net-next] net: usb: log errors to dmesg/syslog
Date: Sat,  6 Mar 2021 14:12:32 -0800	[thread overview]
Message-ID: <20210306221232.3382941-2-grundler@chromium.org> (raw)
In-Reply-To: <20210306221232.3382941-1-grundler@chromium.org>

Errors in protocol should be logged when the driver aborts operations.
If the driver can carry on and "humor" the device, then emitting
the message as debug output level is fine.

Signed-off-by: Grant Grundler <grundler@chromium.org>
---
 drivers/net/usb/usbnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Reposting to net-next per instructions in https://www.spinics.net/lists/netdev/msg715496.html

I've applied this patch to most chromeos kernels:
    https://chromium-review.googlesource.com/q/hashtag:usbnet-rtl8156-support

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 1447da1d5729..bc7b93399bd5 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -887,7 +887,7 @@ int usbnet_open (struct net_device *net)
 
 	// insist peer be connected
 	if (info->check_connect && (retval = info->check_connect (dev)) < 0) {
-		netif_dbg(dev, ifup, dev->net, "can't open; %d\n", retval);
+		netif_err(dev, ifup, dev->net, "can't open; %d\n", retval);
 		goto done;
 	}
 
-- 
2.29.2


  reply	other threads:[~2021-03-06 22:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06 22:12 [PATCH net-next] net: usb: cdc_ncm: emit dev_err on error paths Grant Grundler
2021-03-06 22:12 ` Grant Grundler [this message]
2021-03-08 20:00   ` [PATCH net-next] net: usb: log errors to dmesg/syslog patchwork-bot+netdevbpf
2021-03-08 20:00 ` [PATCH net-next] net: usb: cdc_ncm: emit dev_err on error paths patchwork-bot+netdevbpf

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=20210306221232.3382941-2-grundler@chromium.org \
    --to=grundler@chromium.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=oneukum@suse.com \
    --cc=roland@kernel.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).