summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/adv.c16
-rw-r--r--sys/dev/ic/adv.h10
2 files changed, 18 insertions, 8 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index be26cd388ce..e6a22226a3d 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.8 2001/08/12 20:33:50 mickey Exp $ */
+/* $OpenBSD: adv.c,v 1.9 2001/08/26 18:03:07 krw Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -778,9 +778,10 @@ adv_scsi_cmd(xs)
adv_free_ccb(sc, ccb);
return (COMPLETE);
}
- bus_dmamap_sync(dmat, ccb->dmamap_xfer,
- (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD :
- BUS_DMASYNC_PREWRITE);
+ adv_bus_dmamap_sync(dmat, ccb->dmamap_xfer,
+ 0, ccb->dmamap_xfer->dm_mapsize,
+ ((flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD :
+ BUS_DMASYNC_PREWRITE));
memset(&ccb->sghead, 0, sizeof(ASC_SG_HEAD));
@@ -989,9 +990,10 @@ adv_narrow_isr_callback(sc, qdonep)
* the data buffer.
*/
if (xs->datalen) {
- bus_dmamap_sync(dmat, ccb->dmamap_xfer,
- (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD :
- BUS_DMASYNC_POSTWRITE);
+ adv_bus_dmamap_sync(dmat, ccb->dmamap_xfer,
+ 0, ccb->dmamap_xfer->dm_mapsize,
+ ((xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD :
+ BUS_DMASYNC_POSTWRITE));
bus_dmamap_unload(dmat, ccb->dmamap_xfer);
}
if ((ccb->flags & CCB_ALLOC) == 0) {
diff --git a/sys/dev/ic/adv.h b/sys/dev/ic/adv.h
index fc1bec4320e..e3498fb2101 100644
--- a/sys/dev/ic/adv.h
+++ b/sys/dev/ic/adv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.h,v 1.2 1998/09/28 01:56:57 downsj Exp $ */
+/* $OpenBSD: adv.h,v 1.3 2001/08/26 18:03:07 krw Exp $ */
/* $NetBSD: adv.h,v 1.3 1998/09/26 16:02:56 dante Exp $ */
/*
@@ -93,4 +93,12 @@ int adv_intr __P((void *arg));
/******************************************************************************/
+#ifdef __HAS_NEW_BUS_DMAMAP_SYNC
+#define adv_bus_dmamap_sync(tag, map, off, len, op) \
+ bus_dmamap_sync((tag), (map), (off), (len), (op))
+#else
+#define adv_bus_dmamap_sync(tag, map, off, len, op) \
+ bus_dmamap_sync((tag), (map), (op))
+#endif
+
#endif /* _ADVANSYS_NARROW_H_ */