Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2015 22:25:50 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283636 - head/sys/dev/bwi
Message-ID:  <201505272225.t4RMPor9075247@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505272225.t4RMPor9075247>