bge: Add missing bit of commit f47afe1
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 28 Jun 2012 04:45:32 +0000 (12:45 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 28 Jun 2012 04:48:48 +0000 (12:48 +0800)
sys/dev/netif/bge/if_bge.c
sys/dev/netif/bge/if_bgereg.h

index 6f44e62..d00310c 100644 (file)
@@ -1648,8 +1648,10 @@ bge_blockinit(struct bge_softc *sc)
 
        /* Turn on write DMA state machine */
        val = BGE_WDMAMODE_ENABLE|BGE_WDMAMODE_ALL_ATTNS;
-       if (BGE_IS_5755_PLUS(sc))
-               val |= (1 << 29);       /* Enable host coalescing bug fix. */
+       if (BGE_IS_5755_PLUS(sc)) {
+               /* Enable host coalescing bug fix. */
+               val |= BGE_WDMAMODE_STATUS_TAG_FIX;
+       }
        CSR_WRITE_4(sc, BGE_WDMA_MODE, val);
        DELAY(40);
 
@@ -2205,8 +2207,7 @@ bge_reset(struct bge_softc *sc)
 
        /* Disable fastboot on controllers that support it. */
        if (sc->bge_asicrev == BGE_ASICREV_BCM5752 ||
-           sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
-           sc->bge_asicrev == BGE_ASICREV_BCM5787) {
+           BGE_IS_5755_PLUS(sc)) {
                if (bootverbose)
                        if_printf(&sc->arpcom.ac_if, "Disabling fastboot\n");
                CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0);
index d5083a4..54f3b18 100644 (file)
 #define BGE_WDMAMODE_PCI_FIFOOREAD_ATTN        0x00000100
 #define BGE_WDMAMODE_LOCREAD_TOOBIG    0x00000200
 #define BGE_WDMAMODE_ALL_ATTNS         0x000003FC
+#define BGE_WDMAMODE_STATUS_TAG_FIX    0x20000000
 
 /* Write DMA status register */
 #define BGE_WDMASTAT_PCI_TGT_ABRT_ATTN 0x00000004