]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: smsc911x: fix skb handling in receive path
authorWill Deacon <will.deacon@arm.com>
Thu, 12 Apr 2012 05:54:09 +0000 (05:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:17:04 +0000 (10:17 -0700)
commit626398f31f6ad37ca4e5e81a33b0ab3d01953c00
tree7c1672dc1c16df40002dd1521406a8a285e9f8ee
parent1cdee7a0216d67656aba886be73e32d4862a1bab
net: smsc911x: fix skb handling in receive path

[ Upstream commit 3c5e979bd037888dd7d722da22da4b43659af485 ]

The SMSC911x driver resets the ->head, ->data and ->tail pointers in the
skb on the reset path in order to avoid buffer overflow due to packet
padding performed by the hardware.

This patch fixes the receive path so that the skb pointers are fixed up
after the data has been read from the device, The error path is also
fixed to use number of words consistently and prevent erroneous FIFO
fastforwarding when skipping over bad data.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/smsc/smsc911x.c