diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-25 12:43:59 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-08-25 12:43:59 +0000 |
commit | 7537f4aa40390ccd31a691be2e05d337a9fdea68 (patch) | |
tree | 26a214e99a23fba3c014da9d2b4a61680402a04c /sys | |
parent | 4446faacfdb03d1b4c25f86bfcc88a0a29ebbbf2 (diff) |
- Use BUS_DMA_RAW if it's defined.
- pretty.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/pciide.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index e156d090389..8f94ce7270a 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.64 2001/08/25 10:13:30 art Exp $ */ +/* $OpenBSD: pciide.c,v 1.65 2001/08/25 12:43:58 art Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -1006,10 +1006,13 @@ pciide_dma_init(v, channel, drive, databuf, datalen, flags) int error, seg; struct pciide_dma_maps *dma_maps = &sc->pciide_channels[channel].dma_maps[drive]; +#ifndef BUS_DMA_RAW +#define BUS_DMA_RAW 0 +#endif error = bus_dmamap_load(sc->sc_dmat, dma_maps->dmamap_xfer, - databuf, datalen, NULL, BUS_DMA_NOWAIT); + databuf, datalen, NULL, BUS_DMA_NOWAIT|BUS_DMA_RAW); if (error) { printf("%s:%d: unable to load xfer DMA map for" "drive %d, error=%d\n", sc->sc_wdcdev.sc_dev.dv_xname, @@ -1018,8 +1021,7 @@ pciide_dma_init(v, channel, drive, databuf, datalen, flags) } #ifdef __HAVE_NEW_BUS_DMAMAP_SYNC - bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer, - 0, + 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); @@ -1058,8 +1060,7 @@ pciide_dma_init(v, channel, drive, databuf, datalen, flags) htole32(IDEDMA_BYTE_COUNT_EOT); #ifdef __HAVE_NEW_BUS_DMAMAP_SYNC - bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_table, - 0, + bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_table, 0, dma_maps->dmamap_table->dm_mapsize, BUS_DMASYNC_PREWRITE); #else @@ -1136,8 +1137,7 @@ pciide_dma_finish(v, channel, drive) /* Unload the map of the data buffer */ #ifdef __HAVE_NEW_BUS_DMAMAP_SYNC - bus_dmamap_sync(sc->sc_dmat, dma_maps->dmamap_xfer, - 0, + 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); |