diff options
author | mjacob <mjacob@FreeBSD.org> | 2012-08-21 16:18:11 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2012-08-21 16:18:11 +0000 |
commit | 1db52193bc5597cd34d51394a056a80d79182744 (patch) | |
tree | c37f8e7059d9a35d2231300f0ac43775c619b6c1 /sys/dev/isp/isp_pci.c | |
parent | 89d46bf90af120da0abc6b1c40f1a4e43d74107e (diff) | |
download | FreeBSD-src-1db52193bc5597cd34d51394a056a80d79182744.zip FreeBSD-src-1db52193bc5597cd34d51394a056a80d79182744.tar.gz |
Remove dependence on MAXPHYS.
MFC after: 1 month
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-rw-r--r-- | sys/dev/isp/isp_pci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 853856a..7f29265 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1525,7 +1525,7 @@ static int isp_pci_mbxdma(ispsoftc_t *isp) { caddr_t base; - uint32_t len; + uint32_t len, nsegs; int i, error, ns, cmap = 0; bus_size_t slim; /* segment size */ bus_addr_t llim; /* low limit of unavailable dma */ @@ -1567,6 +1567,11 @@ isp_pci_mbxdma(ispsoftc_t *isp) return (1); } + if (isp->isp_osinfo.sixtyfourbit) { + nsegs = ISP_NSEG64_MAX; + } else { + nsegs = ISP_NSEG_MAX; + } #ifdef ISP_TARGET_MODE /* * XXX: We don't really support 64 bit target mode for parallel scsi yet @@ -1579,7 +1584,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) } #endif - if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &isp->isp_osinfo.dmat)) { + if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); |