summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2006-02-01 02:02:49 +0000
committerbrad <brad@openbsd.org>2006-02-01 02:02:49 +0000
commite86055cb8ca81ff59bd9764e825dbee837b65613 (patch)
treeb930b25a8d5675d1ac4eeb9c815010e9e1663374
parentone less magic value. (diff)
downloadwireguard-openbsd-e86055cb8ca81ff59bd9764e825dbee837b65613.tar.xz
wireguard-openbsd-e86055cb8ca81ff59bd9764e825dbee837b65613.zip
rearrange code section for enabling the read DMA state machine
to allow enabling the long burst FIFO on PCI Express cards though its currently disabled at the moment. From jonathan NetBSD and based on the Broadcom Linux driver.
-rw-r--r--sys/dev/pci/if_bge.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 232450a498e..ff06dd15fb4 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.123 2006/02/01 01:53:32 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.124 2006/02/01 02:02:49 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1588,8 +1588,17 @@ bge_blockinit(struct bge_softc *sc)
BGE_WDMAMODE_ENABLE|BGE_WDMAMODE_ALL_ATTNS);
/* Turn on read DMA state machine */
- CSR_WRITE_4(sc, BGE_RDMA_MODE,
- BGE_RDMAMODE_ENABLE|BGE_RDMAMODE_ALL_ATTNS);
+ {
+ uint32_t dma_read_modebits;
+
+ dma_read_modebits =
+ BGE_RDMAMODE_ENABLE | BGE_RDMAMODE_ALL_ATTNS;
+
+ if (sc->bge_pcie && 0)
+ dma_read_modebits |= BGE_RDMA_MODE_FIFO_LONG_BURST;
+
+ CSR_WRITE_4(sc, BGE_RDMA_MODE, dma_read_modebits);
+ }
/* Turn on RX data completion state machine */
CSR_WRITE_4(sc, BGE_RDC_MODE, BGE_RDCMODE_ENABLE);