summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-03-10 20:22:57 +0000
committeryongari <yongari@FreeBSD.org>2010-03-10 20:22:57 +0000
commitb5e5029cff5ea2d9f77e96b8a4e653f26ca772f7 (patch)
treebb446f06153335b7fffbb558700f36c94ec93886
parent7892dc274ebfd581dd00817e35c160a54162b807 (diff)
downloadFreeBSD-src-b5e5029cff5ea2d9f77e96b8a4e653f26ca772f7.zip
FreeBSD-src-b5e5029cff5ea2d9f77e96b8a4e653f26ca772f7.tar.gz
Enable hardware fixes for BCM5704 B0 as recommended by data sheet.
-rw-r--r--sys/dev/bge/if_bge.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 9c47835..11fd891 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1342,6 +1342,7 @@ static int
bge_chipinit(struct bge_softc *sc)
{
uint32_t dma_rw_ctl;
+ uint16_t val;
int i;
/* Set endianness before we access any non-PCI registers. */
@@ -1362,6 +1363,17 @@ bge_chipinit(struct bge_softc *sc)
i < BGE_STATUS_BLOCK_END + 1; i += sizeof(uint32_t))
BGE_MEMWIN_WRITE(sc, i, 0);
+ if (sc->bge_chiprev == BGE_CHIPREV_5704_BX) {
+ /*
+ * Fix data corruption casued by non-qword write with WB.
+ * Fix master abort in PCI mode.
+ * Fix PCI latency timer.
+ */
+ val = pci_read_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, 2);
+ val |= (1 << 10) | (1 << 12) | (1 << 13);
+ pci_write_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, val, 2);
+ }
+
/*
* Set up the PCI DMA control register.
*/
OpenPOWER on IntegriCloud