Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/tc The extraneous interrupt that seems to occur afte...
details: https://anonhg.NetBSD.org/src/rev/c05a4155ea17
branches: trunk
changeset: 473752:c05a4155ea17
user: mhitch <mhitch%NetBSD.org@localhost>
date: Fri Jun 18 05:30:53 1999 +0000
description:
The extraneous interrupt that seems to occur after a reconnect and a DMA transfer
starts running can occur on both DMA in and DMA out. I missed the little comment
in the Mach driver for the DMA out case. Also, only ignore the interrupt if the
TC is non-zero (to match the Mach driver).
diffstat:
sys/dev/tc/asc.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (46 lines):
diff -r 8f3e7a6352a0 -r c05a4155ea17 sys/dev/tc/asc.c
--- a/sys/dev/tc/asc.c Fri Jun 18 05:13:45 1999 +0000
+++ b/sys/dev/tc/asc.c Fri Jun 18 05:30:53 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asc.c,v 1.54 1999/06/13 17:21:29 mhitch Exp $ */
+/* $NetBSD: asc.c,v 1.55 1999/06/18 05:30:53 mhitch Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -902,25 +902,26 @@
state = &asc->st[asc->target];
switch (ASC_PHASE(status)) {
case SCSI_PHASE_DATAI:
- if ((asc->script - asc_scripts) == SCRIPT_DATA_IN + 1 ||
- (asc->script - asc_scripts) == SCRIPT_CONTINUE_IN) {
+ case SCSI_PHASE_DATAO:
+ ASC_TC_GET(regs, len);
+ fifo = regs->asc_flags & ASC_FLAGS_FIFO_CNT;
+ if (len != 0 && (
+ (asc->script - asc_scripts) == SCRIPT_DATA_IN + 1 ||
+ (asc->script - asc_scripts) == SCRIPT_CONTINUE_IN ||
+ (asc->script - asc_scripts) == SCRIPT_DATA_OUT + 1 ||
+ (asc->script - asc_scripts) == SCRIPT_CONTINUE_OUT)) {
/*
* From the Mach driver:
- * After a reconnect and restart dma in, we
+ * After a reconnect and restart dma in/out, we
* seem to have gotten an interrupt even though
* the DMA is running. The Mach driver just
* ignores this interrupt.
*/
- ASC_TC_GET(regs, len);
- fifo = regs->asc_flags & ASC_FLAGS_FIFO_CNT;
printf("asc_intr: ignoring strange interrupt");
- printf(" tc %d fifo residue %d\n", len, fifo);
+ printf(" tc %d fifo residue %d script %d\n",
+ len, fifo, asc->script - asc_scripts);
goto done;
}
- /* FALLTHROUGH */
- case SCSI_PHASE_DATAO:
- ASC_TC_GET(regs, len);
- fifo = regs->asc_flags & ASC_FLAGS_FIFO_CNT;
printf("asc_intr: data overrun: buflen %d dmalen %d tc %d fifo %d\n",
state->buflen, state->dmalen, len, fifo);
goto abort;
Home |
Main Index |
Thread Index |
Old Index