]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit45fcb21ba84a52d583b417de7d9cc3895d8cbe0a
tree5d9d688c49a966ceddc9c9cefbcce1823127f475
parentb7f6c041581b0ee187116fb6b897feea9d01cbeb
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