- 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
This commit is contained in:
Gleb Smirnoff 2015-05-27 22:25:49 +00:00
parent 1f54e596ad
commit 515b3730c6

View File

@ -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);