diff options
author | mav <mav@FreeBSD.org> | 2015-03-22 16:10:28 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-03-22 16:10:28 +0000 |
commit | 346273b3b261e7e750cc49355b25c72c654b72f1 (patch) | |
tree | a46bd5b9cabd421b2112c53ef637b54114865854 /sys | |
parent | 6b287b9c19515c0b5e97d4273bd836a784e2c4b6 (diff) | |
download | FreeBSD-src-346273b3b261e7e750cc49355b25c72c654b72f1.zip FreeBSD-src-346273b3b261e7e750cc49355b25c72c654b72f1.tar.gz |
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.
MFC after: 1 month
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/aac/aac.c | 4 | ||||
-rw-r--r-- | sys/dev/aacraid/aacraid.c | 4 | ||||
-rw-r--r-- | sys/dev/advansys/adwcam.c | 2 | ||||
-rw-r--r-- | sys/dev/aha/aha.c | 2 | ||||
-rw-r--r-- | sys/dev/ahb/ahb.c | 2 | ||||
-rw-r--r-- | sys/dev/amr/amr_pci.c | 13 | ||||
-rw-r--r-- | sys/dev/buslogic/bt.c | 2 | ||||
-rw-r--r-- | sys/dev/bwi/if_bwi.c | 2 | ||||
-rw-r--r-- | sys/dev/bwn/if_bwn.c | 2 | ||||
-rw-r--r-- | sys/dev/ciss/ciss.c | 5 | ||||
-rw-r--r-- | sys/dev/ct/ct_isa.c | 6 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_scsi.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida_eisa.c | 4 | ||||
-rw-r--r-- | sys/dev/ida/ida_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/if_ndis/if_ndis_pci.c | 3 | ||||
-rw-r--r-- | sys/dev/iir/iir.c | 3 | ||||
-rw-r--r-- | sys/dev/iir/iir_pci.c | 2 | ||||
-rw-r--r-- | sys/dev/mlx/mlx.c | 3 | ||||
-rw-r--r-- | sys/dev/mlx/mlx_pci.c | 3 | ||||
-rw-r--r-- | sys/dev/mly/mly.c | 6 | ||||
-rw-r--r-- | sys/dev/trm/trm.c | 2 | ||||
-rw-r--r-- | sys/dev/twe/twe.c | 2 | ||||
-rw-r--r-- | sys/dev/twe/twe_freebsd.c | 8 |
24 files changed, 50 insertions, 38 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 3ea964f..1e53ac3 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -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 */ diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c index 70e3270..7c300a6 100644 --- a/sys/dev/aacraid/aacraid.c +++ b/sys/dev/aacraid/aacraid.c @@ -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 */ diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c index 52ccc51d..6395b00 100644 --- a/sys/dev/advansys/adwcam.c +++ b/sys/dev/advansys/adwcam.c @@ -961,7 +961,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, diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c index feb808a..f35fe4b 100644 --- a/sys/dev/aha/aha.c +++ b/sys/dev/aha/aha.c @@ -458,7 +458,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, diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index e30d32e..21c5f65 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -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, diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 9346e8c..9e730aa 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -260,7 +260,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 */ @@ -277,8 +278,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 */ @@ -292,8 +294,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 */ diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index 7a81955..5276051 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -726,7 +726,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, diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index 9e915aa..aa5369a 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -1916,7 +1916,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 */ diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index 6c5b8fd..959d1f1 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -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 */ diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 6373287..6cdb319 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -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 */ diff --git a/sys/dev/ct/ct_isa.c b/sys/dev/ct/ct_isa.c index 444d9f7..b6a9370 100644 --- a/sys/dev/ct/ct_isa.c +++ b/sys/dev/ct/ct_isa.c @@ -207,7 +207,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) { @@ -223,7 +223,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 */ @@ -231,7 +231,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; diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c index a31cf79..e6bbf1f 100644 --- a/sys/dev/dpt/dpt_scsi.c +++ b/sys/dev/dpt/dpt_scsi.c @@ -1388,7 +1388,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, diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index 16f776f..579fe5d 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -241,7 +241,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, diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index 6c2968a..8d9002b 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -302,8 +302,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, diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index be0e684..31ca250 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -265,8 +265,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, diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index c229da0..b3085db 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -298,7 +298,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 */ diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c index 27c5abb..bf5cec5 100644 --- a/sys/dev/iir/iir.c +++ b/sys/dev/iir/iir.c @@ -201,7 +201,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, diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c index 42e1c81..261f5a6 100644 --- a/sys/dev/iir/iir_pci.c +++ b/sys/dev/iir/iir_pci.c @@ -307,7 +307,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*/&gdt->sc_lock, &gdt->sc_parent_dmat) != 0) { diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 0f92eaf..58eb71b 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -399,7 +399,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 */ diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 23bf53d..28f6463 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -189,7 +189,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 */ diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 1ea371a..7c4ed41 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -392,7 +392,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 */ @@ -410,7 +411,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 */ diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index d12b382..f86523e 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -3381,7 +3381,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, diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index 0c455c1..51c760c 100644 --- a/sys/dev/twe/twe.c +++ b/sys/dev/twe/twe.c @@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request *tr, int usetmp) 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); } diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index aee9ea7..ea9a1f1 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -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 */ |