diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-08-26 02:39:06 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-08-26 02:39:06 +0000 |
commit | 1a3ab74be6a248a9ce5e4f1a69e64bdf72ec1028 (patch) | |
tree | 2b4768bea9b83ebfe3ed4bd9825d4cf3874ddda8 /sys/dev/ic/adw.c | |
parent | 40fa393c45fd6ea6f962a70da026768f6ad9ffa1 (diff) |
Prepare for transition to 5-parameter bus_dmamap_sync() by creating and
using *_bus_dmamap_sync() defines that are defined appropriately
depending on __HAS_NEW_BUS_DMAMAP_SYNC.
Most of the code changes are simple reversions to the original NetBSD
code.
Slip in a siop_script_sync() instead of a manually done code section.
Diffstat (limited to 'sys/dev/ic/adw.c')
-rw-r--r-- | sys/dev/ic/adw.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index ad2c2abcf3e..cd7b4a81bd9 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.20 2001/07/11 17:31:24 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.21 2001/08/26 02:39:05 krw Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -854,9 +854,10 @@ adw_build_req(xs, ccb, flags) adw_free_ccb(sc, ccb); return (0); } - bus_dmamap_sync(dmat, ccb->dmamap_xfer, - (xs->flags & SCSI_DATA_IN) ? - BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); + adw_bus_dmamap_sync(dmat, ccb->dmamap_xfer, + 0, ccb->dmamap_xfer->dm_mapsize, + (xs->flags & SCSI_DATA_IN) ? + BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); /* * Build scatter-gather list. @@ -1205,9 +1206,10 @@ adw_isr_callback(sc, scsiq) */ dmat = sc->sc_dmat; if (xs->datalen) { - bus_dmamap_sync(dmat, ccb->dmamap_xfer, - (xs->flags & SCSI_DATA_IN) ? - BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); + adw_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); } |