diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-01-23 00:02:29 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-01-23 00:02:29 +0000 |
commit | 2df6044b61d3d828971f1d8cca95a1f6a6a1d6b1 (patch) | |
tree | 697c8c64540156749766d8f2e30aa703aa0c530c /sys/dev/isp/isp_sbus.c | |
parent | 3624354c54eb965482e4bb6a2769c0feb7248692 (diff) | |
download | FreeBSD-src-2df6044b61d3d828971f1d8cca95a1f6a6a1d6b1.zip FreeBSD-src-2df6044b61d3d828971f1d8cca95a1f6a6a1d6b1.tar.gz |
Clean up some of the various platform and release specific dma tag
stuff so it is centralized in isp_freebsd.h.
Take out PCI posting flushed in qla2100/2200 register reads except for
2100s.
Diffstat (limited to 'sys/dev/isp/isp_sbus.c')
-rw-r--r-- | sys/dev/isp/isp_sbus.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c index b45d5ea..c9a4294 100644 --- a/sys/dev/isp/isp_sbus.c +++ b/sys/dev/isp/isp_sbus.c @@ -474,23 +474,6 @@ imc(void *arg, bus_dma_segment_t *segs, int nseg, int error) } } -/* - * Should be BUS_SPACE_MAXSIZE, but MAXPHYS is larger than BUS_SPACE_MAXSIZE - */ -#define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1) - -#if __FreeBSD_version < 700020 -#define BUS_DMA_ROOTARG NULL -#define isp_dma_tag_create(a, b, c, d, e, f, g, h, i, j, k, z) \ - bus_dma_tag_create(a, b, c, d, e, f, g, h, i, j, k, \ - busdma_lock_mutex, &Giant, z) -#else -#define BUS_DMA_ROOTARG bus_get_dma_tag(sbs->sbus_dev) -#define isp_dma_tag_create(a, b, c, d, e, f, g, h, i, j, k, z) \ - bus_dma_tag_create(a, b, c, d, e, f, g, h, i, j, k, \ - busdma_lock_mutex, &Giant, z) -#endif - static int isp_sbus_mbxdma(ispsoftc_t *isp) { @@ -509,11 +492,10 @@ isp_sbus_mbxdma(ispsoftc_t *isp) ISP_UNLOCK(isp); - if (isp_dma_tag_create(BUS_DMA_ROOTARG, 1, BUS_SPACE_MAXADDR_24BIT+1, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT, - NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, ISP_NSEGS, - BUS_SPACE_MAXADDR_24BIT, 0, - &sbs->dmat)) { + if (isp_dma_tag_create(BUS_DMA_ROOTARG(sbs->sbus_dev), 1, + BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, + ISP_NSEGS, BUS_SPACE_MAXADDR_24BIT, 0, &sbs->dmat)) { isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); ISP_LOCK(isp); return(1); |