diff options
author | marius <marius@FreeBSD.org> | 2007-01-21 19:32:51 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2007-01-21 19:32:51 +0000 |
commit | 95a9b2142ae1f23ba99ffffc7acc4055f2c40cea (patch) | |
tree | 0022c3a9a6df560b7e242e09f139c9d0dd23011b /sys/dev/isp | |
parent | 32ccb0b9691d9721a82fc29bc9002a655b8622b6 (diff) | |
download | FreeBSD-src-95a9b2142ae1f23ba99ffffc7acc4055f2c40cea.zip FreeBSD-src-95a9b2142ae1f23ba99ffffc7acc4055f2c40cea.tar.gz |
Change the remainder of the drivers for DMA'ing devices enabled in the
sparc64 GENERIC and the sound device drivers known working on sparc64
to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid
of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4),
stge(4) and ti(4) these changes are runtime tested (unless I booted up
the wrong kernels again...).
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_sbus.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c index 1b70a95..b45d5ea 100644 --- a/sys/dev/isp/isp_sbus.c +++ b/sys/dev/isp/isp_sbus.c @@ -479,6 +479,18 @@ imc(void *arg, bus_dma_segment_t *segs, int nseg, int error) */ #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) { @@ -497,10 +509,10 @@ isp_sbus_mbxdma(ispsoftc_t *isp) ISP_UNLOCK(isp); - if (bus_dma_tag_create(NULL, 1, BUS_SPACE_MAXADDR_24BIT+1, + 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, busdma_lock_mutex, &Giant, + BUS_SPACE_MAXADDR_24BIT, 0, &sbs->dmat)) { isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); ISP_LOCK(isp); |