diff options
author | yongari <yongari@FreeBSD.org> | 2010-10-23 21:25:50 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-10-23 21:25:50 +0000 |
commit | cbeee1455f30d3329a81e17f56c256252d2b0f4f (patch) | |
tree | 791ae9749ecd404757b5b961f0a55f64630caddb /sys/dev/bge | |
parent | de9392f9e014151a889a4d86de9f6736a94f158e (diff) | |
download | FreeBSD-src-cbeee1455f30d3329a81e17f56c256252d2b0f4f.zip FreeBSD-src-cbeee1455f30d3329a81e17f56c256252d2b0f4f.tar.gz |
Apply the same workaround for SDI flow control used on BCM5906 A1
to BCM6906 A0/A2. This should fix a long standing BCM5906 A2 lockup
issues. Data sheet explicitly mentions BCM5906 A0, A1 and A2 use
de-pipelined mode on these revisions.
Special thanks to Buganini who tried all combinations of
experimental patches for more than 10 days.
Tested by: Buganini <buganini <> gmail dot com >
Diffstat (limited to 'sys/dev/bge')
-rw-r--r-- | sys/dev/bge/if_bge.c | 13 | ||||
-rw-r--r-- | sys/dev/bge/if_bgereg.h | 1 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 95de34c..92b39f3 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1693,11 +1693,14 @@ bge_blockinit(struct bge_softc *sc) bge_writembx(sc, BGE_MBX_RX_MINI_PROD_LO, 0); } - /* Choose de-pipeline mode for BCM5906 A1. */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5906 && - sc->bge_chiprev == BGE_CHIPID_BCM5906_A1) - CSR_WRITE_4(sc, BGE_ISO_PKT_TX, - (CSR_READ_4(sc, BGE_ISO_PKT_TX) & ~3) | 2); + /* Choose de-pipeline mode for BCM5906 A0, A1 and A2. */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { + if (sc->bge_chiprev == BGE_CHIPID_BCM5906_A0 || + sc->bge_chiprev == BGE_CHIPID_BCM5906_A1 || + sc->bge_chiprev == BGE_CHIPID_BCM5906_A2) + CSR_WRITE_4(sc, BGE_ISO_PKT_TX, + (CSR_READ_4(sc, BGE_ISO_PKT_TX) & ~3) | 2); + } /* * The BD ring replenish thresholds control how often the * hardware fetches new BD's from the producer rings in host diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h index a4f3f83..a50bf59 100644 --- a/sys/dev/bge/if_bgereg.h +++ b/sys/dev/bge/if_bgereg.h @@ -306,6 +306,7 @@ #define BGE_CHIPID_BCM5787_A0 0xb000 #define BGE_CHIPID_BCM5787_A1 0xb001 #define BGE_CHIPID_BCM5787_A2 0xb002 +#define BGE_CHIPID_BCM5906_A0 0xc000 #define BGE_CHIPID_BCM5906_A1 0xc001 #define BGE_CHIPID_BCM5906_A2 0xc002 #define BGE_CHIPID_BCM57780_A0 0x57780000 |