usbnet: smsc95xx: check for csum being in last four bytes
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 14 Nov 2018 11:50:22 +0000 (11:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Nov 2018 04:16:19 +0000 (20:16 -0800)
commit75938f77105fcede560b9b6967389cdbd6b83361
tree5d9d688c49a966ceddc9c9cefbcce1823127f475
parent6809d2167c404c2c8cbbbe1667c70ea88576ccac
usbnet: smsc95xx: check for csum being in last four bytes

The manual states that the checksum cannot lie in the last DWORD of the
transmission, so add a basic check for this and fall back to software
checksumming the packet.

This only seems to trigger for ACK packets with no options or data to
return to the other end, and the use of the tx-alignment option makes
it more likely to happen.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c