Enable TX MAC state machine lockup fix for both BCM5755 or higher

and BCM5906. Publicly available data sheet just says it may happen
due to corrupted TxMbuf.
This commit is contained in:
Pyun YongHyeon 2010-10-22 18:31:44 +00:00
parent 104d506ddd
commit f6a6548885
2 changed files with 7 additions and 1 deletions

View File

@ -4409,6 +4409,7 @@ bge_init_locked(struct bge_softc *sc)
{
struct ifnet *ifp;
uint16_t *m;
uint32_t mode;
BGE_LOCK_ASSERT(sc);
@ -4514,8 +4515,12 @@ bge_init_locked(struct bge_softc *sc)
/* Init TX ring. */
bge_init_tx_ring(sc);
/* Enable TX MAC state machine lockup fix. */
mode = CSR_READ_4(sc, BGE_TX_MODE);
if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
mode |= BGE_TXMODE_MBUF_LOCKUP_FIX;
/* Turn on transmitter. */
BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_ENABLE);
CSR_WRITE_4(sc, BGE_TX_MODE, mode | BGE_TXMODE_ENABLE);
/* Turn on receiver. */
BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE);

View File

@ -765,6 +765,7 @@
#define BGE_TXMODE_FLOWCTL_ENABLE 0x00000010
#define BGE_TXMODE_BIGBACKOFF_ENABLE 0x00000020
#define BGE_TXMODE_LONGPAUSE_ENABLE 0x00000040
#define BGE_TXMODE_MBUF_LOCKUP_FIX 0x00000100
/* Transmit MAC status register */
#define BGE_TXSTAT_RX_XOFFED 0x00000001