summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2005-09-30 09:55:21 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2005-09-30 09:55:21 +0000
commit8ded6bbbbbbd348bac60b5dd5526bf4dc65cb43a (patch)
tree7caeb13021a2c5046e877bbe47f302352b42bb9c /sys/dev
parent2a7c0ed0e551fd37124459ee68d7f52c3bb14956 (diff)
sync the dma mapping for the data buffer in the right direction when
sending commands
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/ami.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 9608b785969..fc472e16ec7 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.88 2005/09/30 07:53:03 dlg Exp $ */
+/* $OpenBSD: ami.c,v 1.89 2005/09/30 09:55:20 dlg Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1073,7 +1073,8 @@ ami_cmd(ccb, flags, wait)
AMI_DPRINTF(AMI_D_DMA, ("> "));
bus_dmamap_sync(sc->dmat, dmap, 0, dmap->dm_mapsize,
- BUS_DMASYNC_PREWRITE);
+ (ccb->ccb_dir == AMI_CCB_IN) ?
+ BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
} else
ccb->ccb_cmd.acc_mbox.amb_nsge = 0;