diff options
author | scottl <scottl@FreeBSD.org> | 2002-12-31 04:22:36 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2002-12-31 04:22:36 +0000 |
commit | 606eb482062c47f0626b0585520156f3c95a27ad (patch) | |
tree | 3e4898e44a1d72bd08898f59a4f32527226c83b1 /sys/dev/aic7xxx | |
parent | a9d3194c618b86a9cb3f7f4bf793b35c9a59c0fc (diff) | |
download | FreeBSD-src-606eb482062c47f0626b0585520156f3c95a27ad.zip FreeBSD-src-606eb482062c47f0626b0585520156f3c95a27ad.tar.gz |
Convert the use of MAXBSIZE in the dma tag to more appropriate values.
Use BUS_SPACE_MAXSIZE_32BIT for the parent dma tags, and
(NSEGS - 1) * PAGE_SIZE for the data buffer tags. FreeBSD/sparc64 is
more strict about checking these values that other arches.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/ahc_eisa.c | 5 | ||||
-rw-r--r-- | sys/dev/aic7xxx/ahc_pci.c | 5 | ||||
-rw-r--r-- | sys/dev/aic7xxx/ahd_pci.c | 5 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx.c | 3 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.c | 3 |
5 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/aic7xxx/ahc_eisa.c b/sys/dev/aic7xxx/ahc_eisa.c index 9ccd688..17afd41 100644 --- a/sys/dev/aic7xxx/ahc_eisa.c +++ b/sys/dev/aic7xxx/ahc_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_eisa.c#9 $ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_eisa.c#10 $ * * $FreeBSD$ */ @@ -136,7 +136,8 @@ aic7770_attach(device_t dev) /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/AHC_NSEG, + /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/AHC_NSEG, /*maxsegsz*/AHC_MAXTRANSFER_SIZE, /*flags*/BUS_DMA_ALLOCNOW, &ahc->parent_dmat); diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 3a9a24e..8221bb4 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#11 $ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#12 $ * * $FreeBSD$ */ @@ -116,7 +116,8 @@ ahc_pci_attach(device_t dev) : BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/AHC_NSEG, + /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/AHC_NSEG, /*maxsegsz*/AHC_MAXTRANSFER_SIZE, /*flags*/BUS_DMA_ALLOCNOW, &ahc->parent_dmat); diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 9549a4a..b65bec3 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#10 $ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#12 $ * * $FreeBSD$ */ @@ -119,7 +119,8 @@ ahd_pci_attach(device_t dev) : BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/AHD_NSEG, + /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, + /*nsegments*/AHD_NSEG, /*maxsegsz*/AHD_MAXTRANSFER_SIZE, /*flags*/BUS_DMA_ALLOCNOW, &ahd->parent_dmat); diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 19a98c0..423c01c 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -5507,7 +5507,8 @@ ahd_init(struct ahd_softc *ahd) /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/AHD_NSEG, + /*maxsize*/(AHD_NSEG - 1) * PAGE_SIZE, + /*nsegments*/AHD_NSEG, /*maxsegsz*/AHD_MAXTRANSFER_SIZE, /*flags*/BUS_DMA_ALLOCNOW, &ahd->buffer_dmat) != 0) { diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 93c6261..1985ffb 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -4581,7 +4581,8 @@ ahc_init(struct ahc_softc *ahc) /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/AHC_NSEG, + /*maxsize*/(AHC_NSEG - 1) * PAGE_SIZE, + /*nsegments*/AHC_NSEG, /*maxsegsz*/AHC_MAXTRANSFER_SIZE, /*flags*/BUS_DMA_ALLOCNOW, &ahc->buffer_dmat) != 0) { |