summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-02-01 02:02:50 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-02-01 02:02:50 +0000
commitff7324cb506ef8465fc646769a9efade23949e8d (patch)
tree76ccbb078046e8ac04aacfbcf66c22854df93cd4 /sys
parent5e92132a721c148d3bade317358d18c8aaad0f1b (diff)
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.
Diffstat (limited to 'sys')
-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);