]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ks8851: Fix interpretation of rxlen field.
authorMax.Nekludov@us.elster.com <Max.Nekludov@us.elster.com>
Fri, 29 Mar 2013 05:27:36 +0000 (05:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:26:19 +0000 (09:26 -0700)
commit301ccb66b7a86ef1827f9910bc8ad4a7722ab2e9
tree505be6494189902285b2f5d46eaafc3b11c86abc
parentc3b57ba21bf0a1fe812424c51ea9229d9070ff6a
ks8851: Fix interpretation of rxlen field.

[ Upstream commit 14bc435ea54cb888409efb54fc6b76c13ef530e9 ]

According to the Datasheet (page 52):
15-12 Reserved
11-0 RXBC Receive Byte Count
This field indicates the present received frame byte size.

The code has a bug:
                 rxh = ks8851_rdreg32(ks, KS_RXFHSR);
                 rxstat = rxh & 0xffff;
                 rxlen = rxh >> 16; // BUG!!! 0xFFF mask should be applied

Signed-off-by: Max Nekludov <Max.Nekludov@us.elster.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/micrel/ks8851.c