From 515b3730c69943df4f7cc3fc58fd8343c99b852a Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Wed, 27 May 2015 22:25:49 +0000 Subject: [PATCH] - Don't request BUS_DMA_ALLOCNOW for dma tags, that requires enormous amount of memory. - Don't request segsize of BUS_SPACE_MAXSIZE_32BIT, when maxsize is MCLBYTES. With this change bwi_attach() can succeed on i386. Submitted by: scottl --- sys/dev/bwi/if_bwi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index 97b7021cd3a1..9f66ff45da7f 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -1921,7 +1921,7 @@ bwi_dma_alloc(struct bwi_softc *sc) BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->sc_parent_dtag); if (error) { @@ -1942,7 +1942,7 @@ bwi_dma_alloc(struct bwi_softc *sc) tx_ring_sz, 1, BUS_SPACE_MAXSIZE_32BIT, - BUS_DMA_ALLOCNOW, + 0, NULL, NULL, &sc->sc_txring_dtag); if (error) { @@ -1972,7 +1972,7 @@ bwi_dma_alloc(struct bwi_softc *sc) rx_ring_sz, 1, BUS_SPACE_MAXSIZE_32BIT, - BUS_DMA_ALLOCNOW, + 0, NULL, NULL, &sc->sc_rxring_dtag); if (error) { @@ -2097,7 +2097,7 @@ bwi_dma_txstats_alloc(struct bwi_softc *sc, uint32_t ctrl_base, dma_size, 1, BUS_SPACE_MAXSIZE_32BIT, - BUS_DMA_ALLOCNOW, + 0, NULL, NULL, &st->stats_ring_dtag); if (error) { @@ -2145,7 +2145,7 @@ bwi_dma_txstats_alloc(struct bwi_softc *sc, uint32_t ctrl_base, dma_size, 1, BUS_SPACE_MAXSIZE_32BIT, - BUS_DMA_ALLOCNOW, + 0, NULL, NULL, &st->stats_dtag); if (error) { @@ -2227,7 +2227,7 @@ bwi_dma_mbuf_create(struct bwi_softc *sc) NULL, NULL, MCLBYTES, 1, - BUS_SPACE_MAXSIZE_32BIT, + MCLBYTES, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->sc_buf_dtag);