]> git.baikalelectronics.ru Git - uboot.git/commit
net: ks8851: Reset internal RXFC count on bad packet
authorMarek Vasut <marex@denx.de>
Wed, 6 Jan 2021 14:16:01 +0000 (15:16 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Jan 2021 14:15:02 +0000 (09:15 -0500)
commita89513a155dc4f37cf5a55830a55d6799468ebe2
tree717ffba117baec63191daa1c875b4ba185ea7e1f
parentea7fcdd21928a10f8f7af10119c48d8654e26881
net: ks8851: Reset internal RXFC count on bad packet

A sporadic condition occurs when the "bad packet" error is triggered
repeatedly, which results in "bad packet" messages scrolling on the
console during transfer. To avoid triggering this, reset the internal
RXFC count on the first occurance of the "bad packet", which forces
the code to re-read the RX packet count from the MAC, and prevents
any additional "bad packet" messages if there are no more packets in
the MAC. Also print better debug information if this condition occurs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@konsulko.com>
drivers/net/ks8851_mll.c