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
This commit is contained in:
parent
1b0c700c84
commit
6f954fb36b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280347
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -833,7 +833,7 @@ ciss_init_pci(struct ciss_softc *sc)
|
||||
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 @@ ciss_init_pci(struct ciss_softc *sc)
|
||||
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 */
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user