diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2005-09-30 09:55:21 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2005-09-30 09:55:21 +0000 |
commit | 8ded6bbbbbbd348bac60b5dd5526bf4dc65cb43a (patch) | |
tree | 7caeb13021a2c5046e877bbe47f302352b42bb9c /sys/dev | |
parent | 2a7c0ed0e551fd37124459ee68d7f52c3bb14956 (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.c | 5 |
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; |