summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-07-19 14:45:42 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-07-19 14:45:42 +0000
commit3219b7d245c023aa469b9942e25e542d72de9174 (patch)
tree00fbeebbae25bb8e7483e6f2dfc3b6576874e77f /sys/arch
parentfcbfa056f3ecfb3fa9660add2df7f93093054eda (diff)
The last parameter to _dma_init for wdc code is flags, not read,
mask of just the desired bit. ok grange@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/wdc_obio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/macppc/dev/wdc_obio.c b/sys/arch/macppc/dev/wdc_obio.c
index 948f8f1620f..90ab87f9c35 100644
--- a/sys/arch/macppc/dev/wdc_obio.c
+++ b/sys/arch/macppc/dev/wdc_obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc_obio.c,v 1.13 2003/06/11 22:16:34 drahn Exp $ */
+/* $OpenBSD: wdc_obio.c,v 1.14 2003/07/19 14:45:41 drahn Exp $ */
/* $NetBSD: wdc_obio.c,v 1.15 2001/07/25 20:26:33 bouyer Exp $ */
/*-
@@ -538,11 +538,11 @@ wdc_obio_ata6_adjust_timing(struct channel_softc *chp)
}
int
-wdc_obio_dma_init(v, channel, drive, databuf, datalen, read)
+wdc_obio_dma_init(v, channel, drive, databuf, datalen, flags)
void *v;
void *databuf;
size_t datalen;
- int read;
+ int flags;
{
struct wdc_obio_softc *sc = v;
dbdma_command_t *cmdp;
@@ -554,11 +554,12 @@ wdc_obio_dma_init(v, channel, drive, databuf, datalen, read)
return (error);
cmdp = sc->sc_dmacmd;
- cmd = read ? DBDMA_CMD_IN_MORE : DBDMA_CMD_OUT_MORE;
+ cmd = (flags & WDC_DMA_READ) ? DBDMA_CMD_IN_MORE : DBDMA_CMD_OUT_MORE;
for (i = 0; i < sc->sc_dmamap->dm_nsegs; i++, cmdp++) {
if (i + 1 == sc->sc_dmamap->dm_nsegs)
- cmd = read ? DBDMA_CMD_IN_LAST : DBDMA_CMD_OUT_LAST;
+ cmd = (flags & WDC_DMA_READ) ? DBDMA_CMD_IN_LAST :
+ DBDMA_CMD_OUT_LAST;
DBDMA_BUILD(cmdp, cmd, 0, sc->sc_dmamap->dm_segs[i].ds_len,
sc->sc_dmamap->dm_segs[i].ds_addr,
DBDMA_INT_NEVER, DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);