summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-07-14 21:47:49 +0000
committeryongari <yongari@FreeBSD.org>2010-07-14 21:47:49 +0000
commit4c3701762050329e2f975f7a152d24c6a664ac96 (patch)
treeb8edac5492d05aa969f96ac9ec61959299f46c68 /sys/dev/bge
parentbd622e7c205668562f8ab17e4f4f77769497dbe7 (diff)
downloadFreeBSD-src-4c3701762050329e2f975f7a152d24c6a664ac96.zip
FreeBSD-src-4c3701762050329e2f975f7a152d24c6a664ac96.tar.gz
Remove enabling Data FIFO protection with indirect memory access.
r165114 added that code and that change ignored the same logic committed in r135772. In addition, data FIFO protection should be selectively enabled instead of applying to all PCIe devices. While I'm here add BCM5785 to devices that do not require this fix.
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index fbd7be6..6741c96 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -3246,11 +3246,6 @@ bge_reset(struct bge_softc *sc)
DELAY(10);
}
- if (sc->bge_flags & BGE_FLAG_PCIE) {
- reset = bge_readmem_ind(sc, 0x7C00);
- bge_writemem_ind(sc, 0x7C00, reset | (1 << 25));
- }
-
/* Fix up byte swapping. */
CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
BGE_MODECTL_BYTESWAP_DATA);
@@ -3275,7 +3270,9 @@ bge_reset(struct bge_softc *sc)
/* XXX: Broadcom Linux driver. */
if (sc->bge_flags & BGE_FLAG_PCIE &&
- sc->bge_chipid != BGE_CHIPID_BCM5750_A0) {
+ sc->bge_chipid != BGE_CHIPID_BCM5750_A0 &&
+ sc->bge_asicrev != BGE_ASICREV_BCM5785) {
+ /* Enable Data FIFO protection. */
val = CSR_READ_4(sc, 0x7C00);
CSR_WRITE_4(sc, 0x7C00, val | (1 << 25));
}
OpenPOWER on IntegriCloud