diff options
author | mjacob <mjacob@FreeBSD.org> | 2002-09-23 05:02:53 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2002-09-23 05:02:53 +0000 |
commit | 7cc662b0bb2d7766115cf713c56ab3ad4107cc4a (patch) | |
tree | 6d30ecf6c524c9c0645dc5c9056ff566db515704 /sys/dev/isp/isp_pci.c | |
parent | b9b68e183859f883a891c22ec504d7ac1e213b75 (diff) | |
download | FreeBSD-src-7cc662b0bb2d7766115cf713c56ab3ad4107cc4a.zip FreeBSD-src-7cc662b0bb2d7766115cf713c56ab3ad4107cc4a.tar.gz |
Re-specify the bus space creation such that if we have ISP_DAC_SUPPORTED
defined, we set the address space limitation to BUS_SPACE_UNRESTRICTED,
otherwise to BUS_SPACE_MAXADDR_32BIT.
If we have a 1240, ULTRA2 or better, or an FC card, the boundary limit
is BUS_SPACE_UNRESTRICTED and segment limit is BUS_SPACE_MAXADDR_32BIT.
The older 1020/1040 cards have boundary and segment limits of
BUS_SPACE_MAXADDR_24BIT.
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-rw-r--r-- | sys/dev/isp/isp_pci.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 1e60ee5..3701376 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1057,7 +1057,7 @@ isp_pci_mbxdma(struct ispsoftc *isp) caddr_t base; u_int32_t len; int i, error, ns; - bus_size_t bl; + bus_size_t alim, slim; struct imush im; /* @@ -1067,16 +1067,20 @@ isp_pci_mbxdma(struct ispsoftc *isp) return (0); } +#ifdef ISP_DAC_SUPPORTED + alim = BUS_SPACE_UNRESTRICTED; +#else + alim = BUS_SPACE_MAXADDR_32BIT; +#endif if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) { - bl = BUS_SPACE_UNRESTRICTED; + slim = BUS_SPACE_MAXADDR_32BIT; } else { - bl = BUS_SPACE_MAXADDR_24BIT; + slim = BUS_SPACE_MAXADDR_24BIT; } ISP_UNLOCK(isp); - if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR, - BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, - ISP_NSEGS, bl, 0, &pcs->dmat)) { + if (bus_dma_tag_create(NULL, 1, slim+1, alim, alim, + NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &pcs->dmat)) { isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); ISP_LOCK(isp); return(1); @@ -1109,8 +1113,8 @@ isp_pci_mbxdma(struct ispsoftc *isp) } ns = (len / PAGE_SIZE) + 1; - if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, 0, BUS_SPACE_MAXADDR, - BUS_SPACE_MAXADDR, NULL, NULL, len, ns, bl, 0, &isp->isp_cdmat)) { + if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim+1, alim, alim, + NULL, NULL, len, ns, slim, 0, &isp->isp_cdmat)) { isp_prt(isp, ISP_LOGERR, "cannot create a dma tag for control spaces"); free(pcs->dmaps, M_DEVBUF); |