diff options
author | yongari <yongari@FreeBSD.org> | 2010-10-01 17:46:15 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-10-01 17:46:15 +0000 |
commit | f67ca443d18e04788866737dc7b79cb18fffbdc1 (patch) | |
tree | a0ad6f0df9e94e37a8856e5bf35433798291fa1c /sys/dev/bge | |
parent | c271001bfaec426a43c4b59f1c02908057ca43a8 (diff) | |
download | FreeBSD-src-f67ca443d18e04788866737dc7b79cb18fffbdc1.zip FreeBSD-src-f67ca443d18e04788866737dc7b79cb18fffbdc1.tar.gz |
Allow write DMA to request larger DMA burst size to get better
performance on BCM5785.
Obtained from: OpenBSD
Diffstat (limited to 'sys/dev/bge')
-rw-r--r-- | sys/dev/bge/if_bge.c | 4 | ||||
-rw-r--r-- | sys/dev/bge/if_bgereg.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 032b02a..f2b9e22 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1834,6 +1834,10 @@ bge_blockinit(struct bge_softc *sc) if (BGE_IS_5755_PLUS(sc)) val |= BGE_WDMAMODE_STATUS_TAG_FIX; + /* Request larger DMA burst size to get better performance. */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5785) + val |= BGE_WDMAMODE_BURST_ALL_DATA; + /* Turn on write DMA state machine */ CSR_WRITE_4(sc, BGE_WDMA_MODE, val); DELAY(40); diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h index 48816ae..1f16e69 100644 --- a/sys/dev/bge/if_bgereg.h +++ b/sys/dev/bge/if_bgereg.h @@ -1481,6 +1481,7 @@ #define BGE_WDMAMODE_LOCREAD_TOOBIG 0x00000200 #define BGE_WDMAMODE_ALL_ATTNS 0x000003FC #define BGE_WDMAMODE_STATUS_TAG_FIX 0x20000000 +#define BGE_WDMAMODE_BURST_ALL_DATA 0xC0000000 /* Write DMA status register */ #define BGE_WDMASTAT_PCI_TGT_ABRT_ATTN 0x00000004 |