svn commit: r308372 - stable/9/sys/dev/bwi

Andriy Voskoboinyk avos at FreeBSD.org
Sun Nov 6 14:25:54 UTC 2016


Author: avos
Date: Sun Nov  6 14:25:52 2016
New Revision: 308372
URL: https://svnweb.freebsd.org/changeset/base/308372

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/9/sys/dev/bwi/if_bwi.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/9/sys/dev/bwi/if_bwi.c	Sun Nov  6 13:56:34 2016	(r308371)
+++ stable/9/sys/dev/bwi/if_bwi.c	Sun Nov  6 14:25:52 2016	(r308372)
@@ -1917,7 +1917,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) {
@@ -1938,7 +1938,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) {
@@ -1968,7 +1968,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) {
@@ -2093,7 +2093,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) {
@@ -2141,7 +2141,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) {
@@ -2223,7 +2223,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