summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2009-10-07 14:29:48 +0000
committerstas <stas@FreeBSD.org>2009-10-07 14:29:48 +0000
commitb6e5e1e0aaa6b3ee5352a9acf334ae1e4fc04330 (patch)
tree0c4ef3dc25f9cd1ac45fe2a548e94c43c6419f17
parent1f37fb0d498fafae184b22da28aba47ea90b0b50 (diff)
downloadFreeBSD-src-b6e5e1e0aaa6b3ee5352a9acf334ae1e4fc04330.zip
FreeBSD-src-b6e5e1e0aaa6b3ee5352a9acf334ae1e4fc04330.tar.gz
- Give a name to the host coalescing bug fix WDMA mode register bit instead
of using hardcoded value in the code. Obtained from: OpenBSD
-rw-r--r--sys/dev/bge/if_bge.c2
-rw-r--r--sys/dev/bge/if_bgereg.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index d9a7b7f..1fabee0 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1789,7 +1789,7 @@ bge_blockinit(struct bge_softc *sc)
/* Enable host coalescing bug fix. */
if (BGE_IS_5755_PLUS(sc))
- val |= 1 << 29;
+ val |= BGE_WDMAMODE_STATUS_TAG_FIX;
/* Turn on write DMA state machine */
CSR_WRITE_4(sc, BGE_WDMA_MODE, val);
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 7e8b38d..ab336f4 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -1431,6 +1431,7 @@
#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
OpenPOWER on IntegriCloud