From 3c8b1aa78458864da81f382e90c9812309ecf07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Fri, 8 Apr 2005 12:16:51 +0000 Subject: [PATCH] Put the BUS_DMASYNC_PREWRITE in the rigth position. --- sys/dev/ata/ata-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index 98e35a16ad2f..825f81820c20 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -241,12 +241,12 @@ ata_dmaload(struct ata_device *atadev, caddr_t data, int32_t count, int dir) cba.dmatab = ch->dma->sg; - bus_dmamap_sync(ch->dma->sg_tag, ch->dma->sg_map, BUS_DMASYNC_PREWRITE); - if (bus_dmamap_load(ch->dma->data_tag, ch->dma->data_map, data, count, ch->dma->setprd, &cba, 0) || cba.error) return -1; + bus_dmamap_sync(ch->dma->sg_tag, ch->dma->sg_map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(ch->dma->data_tag, ch->dma->data_map, dir ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);