svn commit: r281827 - in stable/9/sys/dev: aac aacraid advansys aha ahb amr buslogic bwi bwn ciss ct dpt ida if_ndis iir mlx mly trm twe

Alexander Motin mav at FreeBSD.org
Tue Apr 21 11:29:15 UTC 2015


Author: mav
Date: Tue Apr 21 11:29:07 2015
New Revision: 281827
URL: https://svnweb.freebsd.org/changeset/base/281827

Log:
  MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do.
  
  In some cases limits are just not needed, in others -- DFLTPHYS is the
  right constant to use instead.

Modified:
  stable/9/sys/dev/aac/aac.c
  stable/9/sys/dev/aacraid/aacraid.c
  stable/9/sys/dev/advansys/adwcam.c
  stable/9/sys/dev/aha/aha.c
  stable/9/sys/dev/ahb/ahb.c
  stable/9/sys/dev/amr/amr_pci.c
  stable/9/sys/dev/buslogic/bt.c
  stable/9/sys/dev/bwi/if_bwi.c
  stable/9/sys/dev/bwn/if_bwn.c
  stable/9/sys/dev/ciss/ciss.c
  stable/9/sys/dev/ct/ct_isa.c
  stable/9/sys/dev/dpt/dpt_scsi.c
  stable/9/sys/dev/ida/ida.c
  stable/9/sys/dev/ida/ida_eisa.c
  stable/9/sys/dev/ida/ida_pci.c
  stable/9/sys/dev/if_ndis/if_ndis_pci.c
  stable/9/sys/dev/iir/iir.c
  stable/9/sys/dev/iir/iir_pci.c
  stable/9/sys/dev/mlx/mlx.c
  stable/9/sys/dev/mlx/mlx_pci.c
  stable/9/sys/dev/mly/mly.c
  stable/9/sys/dev/trm/trm.c
  stable/9/sys/dev/twe/twe.c
  stable/9/sys/dev/twe/twe_freebsd.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/aac/aac.c
==============================================================================
--- stable/9/sys/dev/aac/aac.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/aac/aac.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -507,9 +507,9 @@ aac_alloc(struct aac_softc *sc)
 			       BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			       BUS_SPACE_MAXADDR, 	/* highaddr */
 			       NULL, NULL, 		/* filter, filterarg */
-			       MAXBSIZE,		/* maxsize */
+			       sc->aac_max_sectors << 9, /* maxsize */
 			       sc->aac_sg_tablesize,	/* nsegments */
-			       MAXBSIZE,		/* maxsegsize */
+			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			       BUS_DMA_ALLOCNOW,	/* flags */
 			       busdma_lock_mutex,	/* lockfunc */
 			       &sc->aac_io_lock,	/* lockfuncarg */

Modified: stable/9/sys/dev/aacraid/aacraid.c
==============================================================================
--- stable/9/sys/dev/aacraid/aacraid.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/aacraid/aacraid.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -597,9 +597,9 @@ aac_alloc(struct aac_softc *sc)
 			       BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			       BUS_SPACE_MAXADDR, 	/* highaddr */
 			       NULL, NULL, 		/* filter, filterarg */
-			       MAXBSIZE,		/* maxsize */
+			       sc->aac_max_sectors << 9, /* maxsize */
 			       sc->aac_sg_tablesize,	/* nsegments */
-			       MAXBSIZE,		/* maxsegsize */
+			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			       BUS_DMA_ALLOCNOW,	/* flags */
 			       busdma_lock_mutex,	/* lockfunc */
 			       &sc->aac_io_lock,	/* lockfuncarg */

Modified: stable/9/sys/dev/advansys/adwcam.c
==============================================================================
--- stable/9/sys/dev/advansys/adwcam.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/advansys/adwcam.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -965,7 +965,7 @@ adw_init(struct adw_softc *adw)
 			/* highaddr	*/ BUS_SPACE_MAXADDR,
 			/* filter	*/ NULL,
 			/* filterarg	*/ NULL,
-			/* maxsize	*/ MAXBSIZE,
+			/* maxsize	*/ DFLTPHYS,
 			/* nsegments	*/ ADW_SGSIZE,
 			/* maxsegsz	*/ BUS_SPACE_MAXSIZE_32BIT,
 			/* flags	*/ BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/aha/aha.c
==============================================================================
--- stable/9/sys/dev/aha/aha.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/aha/aha.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -460,7 +460,7 @@ aha_init(struct aha_softc* aha)
 				/* highaddr	*/ BUS_SPACE_MAXADDR,
 				/* filter	*/ NULL,
 				/* filterarg	*/ NULL,
-				/* maxsize	*/ MAXBSIZE,
+				/* maxsize	*/ DFLTPHYS,
 				/* nsegments	*/ AHA_NSEG,
 				/* maxsegsz	*/ BUS_SPACE_MAXSIZE_24BIT,
 				/* flags	*/ BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/ahb/ahb.c
==============================================================================
--- stable/9/sys/dev/ahb/ahb.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ahb/ahb.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -298,7 +298,7 @@ ahbattach(device_t dev)
 				/* highaddr	*/ BUS_SPACE_MAXADDR,
 				/* filter	*/ NULL,
 				/* filterarg	*/ NULL,
-				/* maxsize	*/ MAXBSIZE,
+				/* maxsize	*/ DFLTPHYS,
 				/* nsegments	*/ AHB_NSEG,
 				/* maxsegsz	*/ BUS_SPACE_MAXSIZE_32BIT,
 				/* flags	*/ BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/amr/amr_pci.c
==============================================================================
--- stable/9/sys/dev/amr/amr_pci.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/amr/amr_pci.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -261,7 +261,8 @@ amr_pci_attach(device_t dev)
 			   BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, AMR_NSEG,		/* maxsize, nsegments */
+			   BUS_SPACE_MAXSIZE,		/* maxsize */
+			   BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,				/* flags */
 			   NULL, NULL,			/* lockfunc, lockarg */
@@ -278,8 +279,9 @@ amr_pci_attach(device_t dev)
 			   BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			   BUS_SPACE_MAXADDR,		/* highaddr */
 			   NULL, NULL,			/* filter, filterarg */
-			   MAXBSIZE, AMR_NSEG,		/* maxsize, nsegments */
-			   MAXBSIZE,			/* maxsegsize */
+			   DFLTPHYS,			/* maxsize */
+			   AMR_NSEG,			/* nsegments */
+			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,		/* flags */
 			   busdma_lock_mutex,		/* lockfunc */
 			   &sc->amr_list_lock,		/* lockarg */
@@ -293,8 +295,9 @@ amr_pci_attach(device_t dev)
 			   BUS_SPACE_MAXADDR,		/* lowaddr */
 			   BUS_SPACE_MAXADDR,		/* highaddr */
 			   NULL, NULL,			/* filter, filterarg */
-			   MAXBSIZE, AMR_NSEG,		/* maxsize, nsegments */
-			   MAXBSIZE,			/* maxsegsize */
+			   DFLTPHYS,			/* maxsize */
+			   AMR_NSEG,			/* nsegments */
+			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,		/* flags */
 			   busdma_lock_mutex,		/* lockfunc */
 			   &sc->amr_list_lock,		/* lockarg */

Modified: stable/9/sys/dev/buslogic/bt.c
==============================================================================
--- stable/9/sys/dev/buslogic/bt.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/buslogic/bt.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -728,7 +728,7 @@ bt_init(device_t dev)
 				/* highaddr	*/ BUS_SPACE_MAXADDR,
 				/* filter	*/ NULL,
 				/* filterarg	*/ NULL,
-				/* maxsize	*/ MAXBSIZE,
+				/* maxsize	*/ DFLTPHYS,
 				/* nsegments	*/ BT_NSEG,
 				/* maxsegsz	*/ BUS_SPACE_MAXSIZE_32BIT,
 				/* flags	*/ BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/9/sys/dev/bwi/if_bwi.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/bwi/if_bwi.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -1914,7 +1914,7 @@ bwi_dma_alloc(struct bwi_softc *sc)
 			       lowaddr,			/* lowaddr */
 			       BUS_SPACE_MAXADDR,	/* highaddr */
 			       NULL, NULL,		/* filter, filterarg */
-			       MAXBSIZE,		/* maxsize */
+			       BUS_SPACE_MAXSIZE,	/* maxsize */
 			       BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			       BUS_DMA_ALLOCNOW,	/* flags */

Modified: stable/9/sys/dev/bwn/if_bwn.c
==============================================================================
--- stable/9/sys/dev/bwn/if_bwn.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/bwn/if_bwn.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -10381,7 +10381,7 @@ bwn_dma_attach(struct bwn_mac *mac)
 			       lowaddr,			/* lowaddr */
 			       BUS_SPACE_MAXADDR,	/* highaddr */
 			       NULL, NULL,		/* filter, filterarg */
-			       MAXBSIZE,		/* maxsize */
+			       BUS_SPACE_MAXSIZE,	/* maxsize */
 			       BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			       BUS_SPACE_MAXSIZE,	/* maxsegsize */
 			       0,			/* flags */

Modified: stable/9/sys/dev/ciss/ciss.c
==============================================================================
--- stable/9/sys/dev/ciss/ciss.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ciss/ciss.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -833,7 +833,7 @@ setup:
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */
-			   CISS_MAX_SG_ELEMENTS,	/* nsegments */
+			   BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,				/* flags */
 			   NULL, NULL,			/* lockfunc, lockarg */
@@ -851,7 +851,8 @@ setup:
 			   BUS_SPACE_MAXADDR,		/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, CISS_MAX_SG_ELEMENTS,	/* maxsize, nsegments */
+			   (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE, /* maxsize */
+			   CISS_MAX_SG_ELEMENTS,	/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   BUS_DMA_ALLOCNOW,		/* flags */
 			   busdma_lock_mutex, &sc->ciss_mtx,	/* lockfunc, lockarg */

Modified: stable/9/sys/dev/ct/ct_isa.c
==============================================================================
--- stable/9/sys/dev/ct/ct_isa.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ct/ct_isa.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -240,7 +240,7 @@ ct_isa_attach(device_t dev)
 	/* setup DMA map */
 	if (bus_dma_tag_create(NULL, 1, 0,
 			       BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR,
-			       NULL, NULL, MAXBSIZE, 1,
+			       NULL, NULL, DFLTPHYS, 1,
 			       BUS_SPACE_MAXSIZE_32BIT,
 			       BUS_DMA_ALLOCNOW, NULL, NULL,
 			       &ct->sc_dmat) != 0) {
@@ -256,7 +256,7 @@ ct_isa_attach(device_t dev)
 		return ENXIO;
 	}
 
-	bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE,
+	bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS,
 			ct_dmamap, &addr, BUS_DMA_NOWAIT);
 
 	/* setup machdep softc */
@@ -264,7 +264,7 @@ ct_isa_attach(device_t dev)
 	bs->sc_io_control = 0;
 	bs->sc_bounce_phys = (u_int8_t *)addr;
 	bs->sc_bounce_addr = vaddr;
-	bs->sc_bounce_size = MAXBSIZE;
+	bs->sc_bounce_size = DFLTPHYS;
 	bs->sc_minphys = (1 << 24);
 	bs->sc_dmasync_before = ct_isa_dmasync_before;
 	bs->sc_dmasync_after = ct_isa_dmasync_after;

Modified: stable/9/sys/dev/dpt/dpt_scsi.c
==============================================================================
--- stable/9/sys/dev/dpt/dpt_scsi.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/dpt/dpt_scsi.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -1390,7 +1390,7 @@ dpt_init(struct dpt_softc *dpt)
 				/* highaddr	*/ BUS_SPACE_MAXADDR,
 				/* filter	*/ NULL,
 				/* filterarg	*/ NULL,
-				/* maxsize	*/ MAXBSIZE,
+				/* maxsize	*/ DFLTPHYS,
 				/* nsegments	*/ dpt->sgsize,
 				/* maxsegsz	*/ BUS_SPACE_MAXSIZE_32BIT,
 				/* flags	*/ BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/ida/ida.c
==============================================================================
--- stable/9/sys/dev/ida/ida.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ida/ida.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -234,7 +234,7 @@ ida_init(struct ida_softc *ida)
 		/* highaddr	*/ BUS_SPACE_MAXADDR,
 		/* filter	*/ NULL,
 		/* filterarg	*/ NULL,
-		/* maxsize	*/ MAXBSIZE,
+		/* maxsize	*/ DFLTPHYS,
 		/* nsegments	*/ IDA_NSEG,
 		/* maxsegsz	*/ BUS_SPACE_MAXSIZE_32BIT,
 		/* flags	*/ 0,

Modified: stable/9/sys/dev/ida/ida_eisa.c
==============================================================================
--- stable/9/sys/dev/ida/ida_eisa.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ida/ida_eisa.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -300,8 +300,8 @@ ida_eisa_attach(device_t dev)
 		/* highaddr	*/	BUS_SPACE_MAXADDR,
 		/* filter	*/	NULL,
 		/* filterarg	*/	NULL,
-		/* maxsize	*/	MAXBSIZE,
-		/* nsegments	*/	IDA_NSEG,
+		/* maxsize	*/	BUS_SPACE_MAXSIZE_32BIT,
+		/* nsegments	*/	BUS_SPACE_UNRESTRICTED,
 		/* maxsegsize	*/	BUS_SPACE_MAXSIZE_32BIT,
 		/* flags	*/	BUS_DMA_ALLOCNOW,
 		/* lockfunc	*/	NULL,

Modified: stable/9/sys/dev/ida/ida_pci.c
==============================================================================
--- stable/9/sys/dev/ida/ida_pci.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/ida/ida_pci.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -263,8 +263,8 @@ ida_pci_attach(device_t dev)
 		/* highaddr	*/ BUS_SPACE_MAXADDR,
 		/* filter	*/ NULL,
 		/* filterarg	*/ NULL,
-		/* maxsize	*/ MAXBSIZE,
-		/* nsegments	*/ IDA_NSEG,
+		/* maxsize	*/ BUS_SPACE_MAXSIZE_32BIT,
+		/* nsegments	*/ BUS_SPACE_UNRESTRICTED,
 		/* maxsegsize	*/ BUS_SPACE_MAXSIZE_32BIT,
 		/* flags	*/ BUS_DMA_ALLOCNOW,
 		/* lockfunc	*/ NULL,

Modified: stable/9/sys/dev/if_ndis/if_ndis_pci.c
==============================================================================
--- stable/9/sys/dev/if_ndis/if_ndis_pci.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/if_ndis/if_ndis_pci.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -295,7 +295,8 @@ ndis_attach_pci(dev)
 			BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
                         BUS_SPACE_MAXADDR,	/* highaddr */
 			NULL, NULL,		/* filter, filterarg */
-			MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */
+			BUS_SPACE_MAXSIZE_32BIT, /* maxsize */
+			NDIS_NSEG_NEW,		/* nsegments */
 			BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */
 			BUS_DMA_ALLOCNOW,       /* flags */
 			NULL, NULL,		/* lockfunc, lockarg */

Modified: stable/9/sys/dev/iir/iir.c
==============================================================================
--- stable/9/sys/dev/iir/iir.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/iir/iir.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -204,7 +204,8 @@ iir_init(struct gdt_softc *gdt)
                            /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
                            /*highaddr*/BUS_SPACE_MAXADDR,
                            /*filter*/NULL, /*filterarg*/NULL,
-                           /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG,
+			   /*maxsize*/DFLTPHYS,
+			   /*nsegments*/GDT_MAXSG,
                            /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
                            /*flags*/BUS_DMA_ALLOCNOW,
 			   /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant,

Modified: stable/9/sys/dev/iir/iir_pci.c
==============================================================================
--- stable/9/sys/dev/iir/iir_pci.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/iir/iir_pci.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -323,7 +323,7 @@ iir_pci_attach(device_t dev)
                            /*highaddr*/BUS_SPACE_MAXADDR,
                            /*filter*/NULL, /*filterarg*/NULL,
                            /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                           /*nsegments*/GDT_MAXSG,
+			   /*nsegments*/BUS_SPACE_UNRESTRICTED,
                            /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
 			   /*flags*/0, /*lockfunc*/busdma_lock_mutex,
 			   /*lockarg*/&Giant, &gdt->sc_parent_dmat) != 0) {

Modified: stable/9/sys/dev/mlx/mlx.c
==============================================================================
--- stable/9/sys/dev/mlx/mlx.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/mlx/mlx.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -378,7 +378,8 @@ mlx_attach(struct mlx_softc *sc)
 			       BUS_SPACE_MAXADDR,	/* lowaddr */
 			       BUS_SPACE_MAXADDR, 	/* highaddr */
 			       NULL, NULL, 		/* filter, filterarg */
-			       MAXBSIZE, MLX_NSEG,	/* maxsize, nsegments */
+			       MLX_MAXPHYS,		/* maxsize */
+			       MLX_NSEG,		/* nsegments */
 			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			       0,			/* flags */
 			       busdma_lock_mutex,	/* lockfunc */

Modified: stable/9/sys/dev/mlx/mlx_pci.c
==============================================================================
--- stable/9/sys/dev/mlx/mlx_pci.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/mlx/mlx_pci.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -184,7 +184,8 @@ mlx_pci_attach(device_t dev)
 			       BUS_SPACE_MAXADDR_32BIT, /* lowaddr */
 			       BUS_SPACE_MAXADDR, 	/* highaddr */
 			       NULL, NULL, 		/* filter, filterarg */
-			       MAXBSIZE, MLX_NSEG,	/* maxsize, nsegments */
+			       BUS_SPACE_MAXSIZE_32BIT, /* maxsize */
+			       BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			       BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			       BUS_DMA_ALLOCNOW,	/* flags */
 			       NULL,			/* lockfunc */

Modified: stable/9/sys/dev/mly/mly.c
==============================================================================
--- stable/9/sys/dev/mly/mly.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/mly/mly.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -383,7 +383,8 @@ mly_pci_attach(struct mly_softc *sc)
 			   BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, MLY_MAX_SGENTRIES,	/* maxsize, nsegments */
+			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */
+			   BUS_SPACE_UNRESTRICTED,	/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   BUS_DMA_ALLOCNOW,		/* flags */
 			   NULL,			/* lockfunc */
@@ -401,7 +402,8 @@ mly_pci_attach(struct mly_softc *sc)
 			   BUS_SPACE_MAXADDR,		/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, MLY_MAX_SGENTRIES,	/* maxsize, nsegments */
+			   DFLTPHYS,			/* maxsize */
+			   MLY_MAX_SGENTRIES,		/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,				/* flags */
 			   busdma_lock_mutex,		/* lockfunc */

Modified: stable/9/sys/dev/trm/trm.c
==============================================================================
--- stable/9/sys/dev/trm/trm.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/trm/trm.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -3386,7 +3386,7 @@ trm_init(u_int16_t unit, device_t dev)
 	/*highaddr*/	BUS_SPACE_MAXADDR,
 	/*filter*/	NULL, 
 	/*filterarg*/	NULL,
-	/*maxsize*/	MAXBSIZE,
+	/*maxsize*/	TRM_MAXPHYS,
 	/*nsegments*/	TRM_NSEG,
 	/*maxsegsz*/	TRM_MAXTRANSFER_SIZE,
 	/*flags*/	BUS_DMA_ALLOCNOW,

Modified: stable/9/sys/dev/twe/twe.c
==============================================================================
--- stable/9/sys/dev/twe/twe.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/twe/twe.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request
 
     if (usetmp && (tr->tr_data != NULL)) {
 	tr->tr_flags |= TWE_CMD_IMMEDIATE;
-	if (tr->tr_length > MAXBSIZE)
+	if (tr->tr_length > DFLTPHYS)
 	    return (EINVAL);
 	bcopy(tr->tr_data, sc->twe_immediate, tr->tr_length);
     }

Modified: stable/9/sys/dev/twe/twe_freebsd.c
==============================================================================
--- stable/9/sys/dev/twe/twe_freebsd.c	Tue Apr 21 11:27:50 2015	(r281826)
+++ stable/9/sys/dev/twe/twe_freebsd.c	Tue Apr 21 11:29:07 2015	(r281827)
@@ -233,7 +233,8 @@ twe_attach(device_t dev)
 			   BUS_SPACE_MAXADDR_32BIT, 		/* lowaddr */
 			   BUS_SPACE_MAXADDR, 			/* highaddr */
 			   NULL, NULL, 				/* filter, filterarg */
-			   MAXBSIZE, TWE_MAX_SGL_LENGTH,	/* maxsize, nsegments */
+			   BUS_SPACE_MAXSIZE_32BIT,		/* maxsize */
+			   BUS_SPACE_UNRESTRICTED,		/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,		/* maxsegsize */
 			   0,					/* flags */
 			   NULL,				/* lockfunc */
@@ -301,7 +302,8 @@ twe_attach(device_t dev)
 			   BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, TWE_MAX_SGL_LENGTH,/* maxsize, nsegments */
+			   (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE,/* maxsize */
+			   TWE_MAX_SGL_LENGTH,		/* nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   BUS_DMA_ALLOCNOW,		/* flags */
 			   busdma_lock_mutex,		/* lockfunc */
@@ -320,7 +322,7 @@ twe_attach(device_t dev)
 			   BUS_SPACE_MAXADDR_32BIT,	/* lowaddr */
 			   BUS_SPACE_MAXADDR, 		/* highaddr */
 			   NULL, NULL, 			/* filter, filterarg */
-			   MAXBSIZE, 1,			/* maxsize, nsegments */
+			   DFLTPHYS, 1,			/* maxsize, nsegments */
 			   BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
 			   0,				/* flags */
 			   NULL,			/* lockfunc */


More information about the svn-src-stable-9 mailing list