svn commit: r308367 - stable/10/sys/dev/bwi

Andriy Voskoboinyk avos at FreeBSD.org
Sun Nov 6 13:50:55 UTC 2016


Author: avos
Date: Sun Nov  6 13:50:54 2016
New Revision: 308367
URL: https://svnweb.freebsd.org/changeset/base/308367

Log:
  MFC r283636:
  - 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.
  
  PR:		214235
  Submitted by:	scottl

Modified:
  stable/10/sys/dev/bwi/if_bwi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/10/sys/dev/bwi/if_bwi.c	Sun Nov  6 13:40:03 2016	(r308366)
+++ stable/10/sys/dev/bwi/if_bwi.c	Sun Nov  6 13:50:54 2016	(r308367)
@@ -1918,7 +1918,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) {
@@ -1939,7 +1939,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) {
@@ -1969,7 +1969,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) {
@@ -2094,7 +2094,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) {
@@ -2142,7 +2142,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) {
@@ -2224,7 +2224,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);


More information about the svn-src-all mailing list