diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-08 17:32:46 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-08 17:32:46 +0000 |
commit | 580a5b4e0199d8cead6ea8dd24661c3e868a9504 (patch) | |
tree | 2644134e1f9674bf3a87fdf7285c66e4d05062ef | |
parent | 4f0fc9c88e0160e3b34031091572ec2893623e93 (diff) |
Specify the read/write DMA flag for bounce buffers
-rw-r--r-- | sys/dev/pv/xbf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index b69cb5f6156..cc570ad2730 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.21 2017/02/08 17:23:46 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.22 2017/02/08 17:32:45 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -513,6 +513,10 @@ xbf_bounce_xs(struct scsi_xfer *xs, int desc) mapflags |= BUS_DMA_NOWAIT; else mapflags |= BUS_DMA_WAITOK; + if (ISSET(xs->flags, SCSI_DATA_IN)) + mapflags |= BUS_DMA_READ; + else + mapflags |= BUS_DMA_WRITE; error = xbf_dma_alloc(sc, dma, size, size / PAGE_SIZE, mapflags); if (error) { |