summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2003-07-04 14:04:41 +0000
committersimokawa <simokawa@FreeBSD.org>2003-07-04 14:04:41 +0000
commit1a28b01e3111666aa59273432a22b76afc30bcf9 (patch)
tree6f6e2300c554047a782f3fc1a1aaabb874fc1cf5 /sys
parent4a052c80dfaa6c6be75a1cf4c73594306c024c43 (diff)
downloadFreeBSD-src-1a28b01e3111666aa59273432a22b76afc30bcf9.zip
FreeBSD-src-1a28b01e3111666aa59273432a22b76afc30bcf9.tar.gz
Add compatibility for FreeBSD-4.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/firewire/fwdma.c11
-rw-r--r--sys/dev/firewire/fwohci.c5
-rw-r--r--sys/dev/firewire/fwohci_pci.c5
-rw-r--r--sys/dev/firewire/sbp.c5
4 files changed, 21 insertions, 5 deletions
diff --git a/sys/dev/firewire/fwdma.c b/sys/dev/firewire/fwdma.c
index a16d233..e8c6cce 100644
--- a/sys/dev/firewire/fwdma.c
+++ b/sys/dev/firewire/fwdma.c
@@ -77,7 +77,11 @@ fwdma_malloc(struct firewire_comm *fc, int alignment, bus_size_t size,
/*nsegments*/ 1,
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
/*flags*/ BUS_DMA_ALLOCNOW,
- /*lockfunc*/busdma_lock_mutex,/*lockarg*/&Giant, &dma->dma_tag);
+#if __FreeBSD_version >= 501102
+ /*lockfunc*/busdma_lock_mutex,
+ /*lockarg*/&Giant,
+#endif
+ &dma->dma_tag);
if (err) {
printf("fwdma_malloc: failed(1)\n");
return(NULL);
@@ -171,8 +175,11 @@ fwdma_malloc_multiseg(struct firewire_comm *fc, int alignment,
/*nsegments*/ 1,
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
/*flags*/ BUS_DMA_ALLOCNOW,
+#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
- /*lockarg*/&Giant, &am->dma_tag)) {
+ /*lockarg*/&Giant,
+#endif
+ &am->dma_tag)) {
printf("fwdma_malloc_multiseg: tag_create failed\n");
free(am, M_FW);
return(NULL);
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index 58f924e..986d1a3 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -1188,8 +1188,11 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
/*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1,
/*maxsegsz*/ MAX_REQCOUNT,
/*flags*/ 0,
+#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
- /*lockarg*/&Giant, &dbch->dmat))
+ /*lockarg*/&Giant,
+#endif
+ &dbch->dmat))
return;
/* allocate DB entries and attach one to each DMA channels */
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index 4166239..96cc01c 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -301,8 +301,11 @@ fwohci_pci_attach(device_t self)
/*nsegments*/0x20,
/*maxsegsz*/0x8000,
/*flags*/BUS_DMA_ALLOCNOW,
+#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
- /*lockarg*/&Giant, &sc->fc.dmat);
+ /*lockarg*/&Giant,
+#endif
+ &sc->fc.dmat);
if (err != 0) {
printf("fwohci_pci_attach: Could not allocate DMA tag "
"- error %d\n", err);
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index 6f1b111..e97a908 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -1830,8 +1830,11 @@ END_DEBUG
/*maxsize*/0x100000, /*nsegments*/SBP_IND_MAX,
/*maxsegsz*/SBP_SEG_MAX,
/*flags*/BUS_DMA_ALLOCNOW,
+#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
- /*lockarg*/&Giant, &sbp->dmat);
+ /*lockarg*/&Giant,
+#endif
+ &sbp->dmat);
if (error != 0) {
printf("sbp_attach: Could not allocate DMA tag "
"- error %d\n", error);
OpenPOWER on IntegriCloud