summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pciide.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-05 17:25:59 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-05 17:25:59 +0000
commit85530efaf7a6a42f72dd88dd2812fc34f33a931e (patch)
treefe27ed806015eba36ede599b284de31066d02abb /sys/dev/pci/pciide.c
parent6278fb02068a0fc75a8a6ecb4ed0a3292aad76ab (diff)
Switch everything to the new bus_dmamap_sync API.
Most work by Wilbern Cobb <vedge@csoft.org> with some fixes from me, mickey@ and drahn@.
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r--sys/dev/pci/pciide.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 7c8e1a776d3..095dde889c8 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.71 2001/09/29 04:46:49 jason Exp $ */
+/* $OpenBSD: pciide.c,v 1.72 2001/11/05 17:25:58 art Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -1032,16 +1032,10 @@ pciide_dma_init(v, channel, drive, databuf, datalen, flags)
return error;
}
-#ifdef __HAVE_NEW_BUS_DMAMAP_SYNC
bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer, 0,
dma_maps->dmamap_xfer->dm_mapsize,
(flags & WDC_DMA_READ) ?
BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
-#else
- bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer,
- (flags & WDC_DMA_READ) ?
- BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
-#endif
for (seg = 0; seg < dma_maps->dmamap_xfer->dm_nsegs; seg++) {
#ifdef DIAGNOSTIC
@@ -1071,14 +1065,9 @@ pciide_dma_init(v, channel, drive, databuf, datalen, flags)
dma_maps->dma_table[dma_maps->dmamap_xfer->dm_nsegs -1].byte_count |=
htole32(IDEDMA_BYTE_COUNT_EOT);
-#ifdef __HAVE_NEW_BUS_DMAMAP_SYNC
bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_table, 0,
dma_maps->dmamap_table->dm_mapsize,
BUS_DMASYNC_PREWRITE);
-#else
- bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_table,
- BUS_DMASYNC_PREWRITE);
-#endif
/* Maps are ready. Start DMA function */
#ifdef DIAGNOSTIC
@@ -1148,16 +1137,10 @@ pciide_dma_finish(v, channel, drive)
0x00 : IDEDMA_CMD_WRITE);
/* Unload the map of the data buffer */
-#ifdef __HAVE_NEW_BUS_DMAMAP_SYNC
bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer, 0,
dma_maps->dmamap_xfer->dm_mapsize,
(dma_maps->dma_flags & WDC_DMA_READ) ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
-#else
- bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer,
- (dma_maps->dma_flags & WDC_DMA_READ) ?
- BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
-#endif
bus_dmamap_unload(sc->sc_dmat, dma_maps->dmamap_xfer);
/* Clear status bits */