Skip to content

Commit

Permalink
smsc75xx: fix smsc75xx_set_features()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 22, 2018
1 parent b87b619 commit 88e80c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 88e80c6

Please sign in to comment.