From 071a28f87c3e1f48e28e2f87e748d7f385410878 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Mon, 14 Aug 2006 16:07:40 +0000 Subject: Change bus_dmamap_create to use the appropriate values. This fixes the issues brad was seeing. Help from jason. ok brad. --- sys/dev/pci/if_bnx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/dev/pci/if_bnx.c') 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; -- cgit v1.2.3