From: pefo Date: Mon, 17 Feb 1997 19:08:25 +0000 (+0000) Subject: fixes SCSI. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ea782f3f95af489808d1c04abb9c3a1bfcbbbfb6;p=openbsd fixes SCSI. --- diff --git a/sys/arch/wgrisc/dev/asc.c b/sys/arch/wgrisc/dev/asc.c index c4cdae7b3d3..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.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; \