Author: glebius
Date: Wed May 27 22:25:49 2015
New Revision: 283636
URL: https://svnweb.freebsd.org/changeset/base/283636

Log:
  - 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

Modified:
  head/sys/dev/bwi/if_bwi.c

Modified: head/sys/dev/bwi/if_bwi.c
==============================================================================
--- head/sys/dev/bwi/if_bwi.c   Wed May 27 22:00:05 2015        (r283635)
+++ head/sys/dev/bwi/if_bwi.c   Wed May 27 22:25:49 2015        (r283636)
@@ -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 *
                                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 *
                                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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to