Bug in ks8851.c

David Miller davem at davemloft.net
Fri Mar 29 15:43:48 EDT 2013


From: Max.Nekludov at us.elster.com
Date: Fri, 29 Mar 2013 19:27:36 +0400

> Denis,
> here is patch with commit message:
> 
> Subject: [PATCH] Fix bug in ks8851 driver
> 
> 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 at us.elster.com>

Applied and queued up for -stable, thanks.



More information about the linux-arm-kernel mailing list