summaryrefslogtreecommitdiff
path: root/sys/arch/wgrisc/dev
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1997-02-17 19:08:29 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1997-02-17 19:08:29 +0000
commit5cb0a336a679326057ad40b57543d1f5e8194130 (patch)
treea2bf0127caabe9785a367bebe88f98fa5201ebe8 /sys/arch/wgrisc/dev
parent7ee095337a733285d82a0990c08760c75b572cca (diff)
fixes SCSI.
Diffstat (limited to 'sys/arch/wgrisc/dev')
-rw-r--r--sys/arch/wgrisc/dev/asc.c3
-rw-r--r--sys/arch/wgrisc/dev/dma.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/wgrisc/dev/asc.c b/sys/arch/wgrisc/dev/asc.c
index 13785ab9c0f..4ccba234be5 100644
--- a/sys/arch/wgrisc/dev/asc.c
+++ b/sys/arch/wgrisc/dev/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.1 1997/02/06 16:02:42 pefo Exp $ */
+/* $OpenBSD: asc.c,v 1.2 1997/02/17 19:08:25 pefo Exp $ */
/* $NetBSD: asc.c,v 1.10 1994/12/05 19:11:12 dean Exp $ */
/*-
@@ -1075,6 +1075,7 @@ printf("asc_intr: fifo flush %d len %d fifo %x\n", fifo, len, regs->asc_fifo);
len = state->dmalen - len;
goto do_in;
}
+ DMA_END(&asc->dma);
state->script =
&asc_scripts[SCRIPT_RESUME_DMA_IN];
} else if (state->flags & DMA_OUT)
diff --git a/sys/arch/wgrisc/dev/dma.h b/sys/arch/wgrisc/dev/dma.h
index 3011b068c8e..0eb2e30899f 100644
--- a/sys/arch/wgrisc/dev/dma.h
+++ b/sys/arch/wgrisc/dev/dma.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.h,v 1.2 1997/02/16 22:31:22 pefo Exp $ */
+/* $OpenBSD: dma.h,v 1.3 1997/02/17 19:08:28 pefo Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -140,17 +140,17 @@ typedef struct dma_softc {
if((c)->dma_ch == DMA_CH0) { \
out32(R3715_IO_TIMING, in32(R3715_IO_TIMING) & ~0x10); \
resudial = in32(R3715_DMA_CNT0); \
-if(resudial) \
-printf("res: %d\n", resudial); \
} \
else { \
out32(R3715_IO_TIMING, in32(R3715_IO_TIMING) & ~0x400); \
resudial = in32(R3715_DMA_CNT1); \
} \
+ if(resudial) \
+ resudial++; \
if((c)->mode == DMA_FROM_DEV) { \
int *_v = (int *)(c)->req_va; \
int *_p = (int *)PHYS_TO_UNCACHED(CACHED_TO_PHYS(dma_buffer)); \
- int _n = (c)->req_size; \
+ int _n = (c)->req_size - resudial; \
while(_n > 0) { \
*_v = htonl(*_p); \
_p++; _v++; _n -= 4; \