Restore multi-version cleanliness.

This commit is contained in:
Matt Jacob 2006-09-03 01:26:55 +00:00
parent 048963977c
commit 198b33587b

View File

@ -1396,11 +1396,19 @@ imc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
#define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1)
#if __FreeBSD_version < 500000
#define isp_dma_tag_create bus_dma_tag_create
#else
#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, z)
#elif __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)
busdma_lock_mutex, &Giant, z)
#else
#define BUS_DMA_ROOTARG bus_get_dma_tag(pcs->pci_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
@ -1442,7 +1450,7 @@ isp_pci_mbxdma(ispsoftc_t *isp)
#endif
ISP_UNLOCK(isp);
if (isp_dma_tag_create(bus_get_dma_tag(pcs->pci_dev), 1, slim, llim,
if (isp_dma_tag_create(BUS_DMA_ROOTARG, 1, slim, llim,
hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0,
&pcs->dmat)) {
isp_prt(isp, ISP_LOGERR, "could not create master dma tag");