* [PATCH net] smsc75xx: fix smsc75xx_set_features()
@ 2018-02-21 5:42 Eric Dumazet
2018-02-22 19:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2018-02-21 5:42 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Steve Glendinning
From: Eric Dumazet <edumazet@google.com>
If an attempt is made to disable RX checksums, USB adapter is changed
but netdev->features is not, because smsc75xx_set_features() returns a
non zero value.
This throws errors from netdev_rx_csum_fault() :
<devname>: hw csum failure
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
---
drivers/net/usb/smsc75xx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index d0a113743195acae86931c51eea50b94ddadd487..7a6a1fe793090b8e28f5ef075f5ebc2ad385b5eb 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -954,10 +954,11 @@ static int smsc75xx_set_features(struct net_device *netdev,
/* it's racing here! */
ret = smsc75xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
- if (ret < 0)
+ if (ret < 0) {
netdev_warn(dev->net, "Error writing RFE_CTL\n");
-
- return ret;
+ return ret;
+ }
+ return 0;
}
static int smsc75xx_wait_ready(struct usbnet *dev, int in_pm)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] smsc75xx: fix smsc75xx_set_features()
2018-02-21 5:42 [PATCH net] smsc75xx: fix smsc75xx_set_features() Eric Dumazet
@ 2018-02-22 19:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-02-22 19:05 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, steve.glendinning
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 20 Feb 2018 21:42:26 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> If an attempt is made to disable RX checksums, USB adapter is changed
> but netdev->features is not, because smsc75xx_set_features() returns a
> non zero value.
>
> This throws errors from netdev_rx_csum_fault() :
> <devname>: hw csum failure
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Steve Glendinning <steve.glendinning@shawell.net>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-22 19:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 5:42 [PATCH net] smsc75xx: fix smsc75xx_set_features() Eric Dumazet
2018-02-22 19:05 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.