summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2003-05-04 00:07:21 +0000
committerps <ps@FreeBSD.org>2003-05-04 00:07:21 +0000
commitbebfb7b1d843583a369faa68adb474e146cf9b73 (patch)
treeac7f80d5a3927637024ee979967015f43a86139c /sys/dev/bge
parent0ad8e69a7c715f15aaa35599cd9f816afd2fef36 (diff)
downloadFreeBSD-src-bebfb7b1d843583a369faa68adb474e146cf9b73.zip
FreeBSD-src-bebfb7b1d843583a369faa68adb474e146cf9b73.tar.gz
Implement the write twice to send producer index workaround for
BCM5700 chips as described in the Broadcom Errata documents. Obtained from: NetBSD and Broadcom Errata documentation
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index d7888fe..0d0c7ac 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -934,8 +934,16 @@ bge_init_tx_ring(sc)
{
sc->bge_txcnt = 0;
sc->bge_tx_saved_considx = 0;
+
CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, 0);
+ /* 5700 b2 errata */
+ if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+ CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, 0);
+
CSR_WRITE_4(sc, BGE_MBX_TX_NIC_PROD0_LO, 0);
+ /* 5700 b2 errata */
+ if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+ CSR_WRITE_4(sc, BGE_MBX_TX_NIC_PROD0_LO, 0);
return(0);
}
@@ -2344,6 +2352,9 @@ bge_start(ifp)
/* Transmit */
CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, prodidx);
+ /* 5700 b2 errata */
+ if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+ CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, prodidx);
/*
* Set a timeout in case the chip goes out to lunch.
OpenPOWER on IntegriCloud