Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/tc Pullup 1.61 [mhitch]:
details: https://anonhg.NetBSD.org/src/rev/7e74658c3255
branches: netbsd-1-5
changeset: 490102:7e74658c3255
user: tv <tv%NetBSD.org@localhost>
date: Thu Nov 02 23:59:57 2000 +0000
description:
Pullup 1.61 [mhitch]:
When a read DMA transfer is interrupted by a disconnect on the IOASIC SCSI
and the buffer is not 8-byte aligned, it leaves a partial transfer in the
SDRx registers. This could cause data corruption in dump(8) because the
read-ahead buffers are allocated on a non-aligned address. When the read
DMA transfer is interrupted and the current DMA position is not aligned,
call the dma_end() routine to flush the SDRx register contents to the
buffer.
diffstat:
sys/dev/tc/asc.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 34254a668bb3 -r 7e74658c3255 sys/dev/tc/asc.c
--- a/sys/dev/tc/asc.c Thu Nov 02 23:56:12 2000 +0000
+++ b/sys/dev/tc/asc.c Thu Nov 02 23:59:57 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asc.c,v 1.60 2000/03/30 12:45:43 augustss Exp $ */
+/* $NetBSD: asc.c,v 1.60.4.1 2000/11/02 23:59:57 tv Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -1040,6 +1040,14 @@
state->script =
&asc_scripts[SCRIPT_RESUME_DMA_IN];
state->flags |= DMA_RESUME;
+ /*
+ * If the transfer doesn't end on a 8-byte
+ * boundary, and it's an IOASIC DMA read,
+ * the SDRx registers need to be written to
+ * the buffer.
+ */
+ if (((int)state->buf + state->dmalen - len) & 7)
+ (*asc->dma_end)(asc, state, ASCDMA_READ);
} else if (state->flags & DMA_OUT) {
state->script =
&asc_scripts[SCRIPT_RESUME_DMA_OUT];
Home |
Main Index |
Thread Index |
Old Index