[net-next] net: usb: log errors to dmesg/syslog
diff mbox series

Message ID 20210306221232.3382941-2-grundler@chromium.org
State Accepted
Commit 4d8c79b7e9ff05030aad68421f7584b129933ba6
Headers show
Series
  • [net-next] net: usb: log errors to dmesg/syslog
Related show

Commit Message

Grant Grundler March 6, 2021, 10:12 p.m. UTC
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

Comments

patchwork-bot+netdevbpf@kernel.org March 8, 2021, 8 p.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Sat,  6 Mar 2021 14:12:32 -0800 you wrote:
> 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(-)
> 
> [...]

Here is the summary with links:
  - [net-next] net: usb: log errors to dmesg/syslog
    https://git.kernel.org/netdev/net/c/4d8c79b7e9ff

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Patch
diff mbox series

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;
 	}