diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2008-12-09 21:34:22 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2008-12-09 21:34:22 +0000 |
| commit | 90447aad0ae55122d01438a7750c7ba02e63f0c4 (patch) | |
| tree | cb55a56409faba92852fdb80d22f20a6018cfe04 /sys/dev/bge | |
| parent | 21b14a75f6014b4281c30405e6fe5cdd1f4dc4f4 (diff) | |
Notes
Diffstat (limited to 'sys/dev/bge')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index b7d304b9fdab..557e73568179 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1370,6 +1370,16 @@ bge_chipinit(struct bge_softc *sc) BGE_MODECTL_TX_NO_PHDR_CSUM); /* + * BCM5701 B5 have a bug causing data corruption when using + * 64-bit DMA reads, which can be terminated early and then + * completed later as 32-bit accesses, in combination with + * certain bridges. + */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5701 && + sc->bge_chipid == BGE_CHIPID_BCM5701_B5) + BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_FORCE_PCI32); + + /* * Tell the firmware the driver is running */ if (sc->bge_asf_mode & ASF_STACKUP) @@ -2462,26 +2472,21 @@ bge_attach(device_t dev) */ if (reg != 0) sc->bge_flags |= BGE_FLAG_PCIE; - } else if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { - if (reg != 0) - sc->bge_flags |= BGE_FLAG_PCIX; - } - #else if (BGE_IS_5705_PLUS(sc)) { reg = pci_read_config(dev, BGE_PCIE_CAPID_REG, 4); if ((reg & 0xFF) == BGE_PCIE_CAPID) sc->bge_flags |= BGE_FLAG_PCIE; +#endif } else { /* * Check if the device is in PCI-X Mode. * (This bit is not valid on PCI Express controllers.) */ - if ((pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4) & + if ((pci_read_config(dev, BGE_PCI_PCISTATE, 4) & BGE_PCISTATE_PCI_BUSMODE) == 0) sc->bge_flags |= BGE_FLAG_PCIX; } -#endif #if __FreeBSD_version > 602105 { |
