summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-08-14 16:07:40 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-08-14 16:07:40 +0000
commit071a28f87c3e1f48e28e2f87e748d7f385410878 (patch)
treebc33c11c4330bbd1c759adc7c1d4efb6927e0038 /sys
parent20518924b83cd331b5ac33bbc6caf75bfe3b0897 (diff)
Change bus_dmamap_create to use the appropriate values. This fixes the
issues brad was seeing. Help from jason. ok brad.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bnx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index 366619de82c..d035369df75 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.9 2006/08/13 19:29:46 marco Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.10 2006/08/14 16:07:39 marco Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -2120,8 +2120,10 @@ bnx_dma_alloc(struct bnx_softc *sc)
* Create DMA maps for the TX buffer mbufs.
*/
for (i = 0; i < TOTAL_TX_BD; i++) {
- if (bus_dmamap_create(sc->bnx_dmatag, MCLBYTES * BNX_MAX_SEGMENTS,
- BNX_MAX_SEGMENTS, MCLBYTES, 0, BUS_DMA_NOWAIT,
+ if (bus_dmamap_create(sc->bnx_dmatag,
+ MCLBYTES * BNX_MAX_SEGMENTS,
+ USABLE_TX_BD - BNX_TX_SLACK_SPACE,
+ MCLBYTES, 0, BUS_DMA_NOWAIT,
&sc->tx_mbuf_map[i])) {
printf(": Could not create Tx mbuf %d DMA map!\n", i);
rc = ENOMEM;