linux/drivers/net/ethernet/natsemi
Finn Thain 772f66421d net/sonic: Fix CAM initialization
Section 4.3.1 of the datasheet says,

    This bit [TXP] must not be set if a Load CAM operation is in
    progress (LCAM is set). The SONIC will lock up if both bits are
    set simultaneously.

Testing has shown that the driver sometimes attempts to set LCAM
while TXP is set. Avoid this by waiting for command completion
before and after giving the LCAM command.

After issuing the Load CAM command, poll for !SONIC_CR_LCAM rather than
SONIC_INT_LCD, because the SONIC_CR_TXP bit can't be used until
!SONIC_CR_LCAM.

When in reset mode, take the opportunity to reset the CAM Enable
register.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-23 21:24:37 +01:00
..
jazzsonic.c net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
macsonic.c net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00
Makefile ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
natsemi.c net: natsemi: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
ns83820.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
sonic.c net/sonic: Fix CAM initialization 2020-01-23 21:24:37 +01:00
sonic.h net/sonic: Quiesce SONIC before re-initializing descriptor memory 2020-01-23 21:24:37 +01:00
xtsonic.c net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00