Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/next68k/dev next68k: Fix silent stall of next68k es...
details: https://anonhg.NetBSD.org/src/rev/b246be11d6f6
branches: trunk
changeset: 373248:b246be11d6f6
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jan 27 15:31:05 2023 +0000
description:
next68k: Fix silent stall of next68k esp(4) SCSI.
next68k esp(4) driver requires nextdma(4) interrupts at ipl 6
during ncr53c9x_intr() for esp(4) at ipl 3. It worked on netbsd-5
and prior, but on netbsd-5 splbio() was changed from ipl 3 to 6
for SMP support and on netbsd-6 ncr53c9x driver was changed to
use mutex(9) instead of simple_lock(9), so nextdma interrupts
were no longer raised during ncr53c9x interrupt handler.
For now, just call mutex_exit(9) and mutex_enter(9) during
waiting nextdma(4) interrupts in MD esp_dma_intr() handler.
This could be wrong and the interrupt handler for nextdma should
be reorganized, but it just works.
Should be pulled up to netbsd-10 and netbsd-9.
diffstat:
sys/arch/next68k/dev/esp.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 9d50239a2cc2 -r b246be11d6f6 sys/arch/next68k/dev/esp.c
--- a/sys/arch/next68k/dev/esp.c Fri Jan 27 15:25:47 2023 +0000
+++ b/sys/arch/next68k/dev/esp.c Fri Jan 27 15:31:05 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esp.c,v 1.64 2017/03/31 08:38:13 msaitoh Exp $ */
+/* $NetBSD: esp.c,v 1.65 2023/01/27 15:31:05 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.64 2017/03/31 08:38:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.65 2023/01/27 15:31:05 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -509,6 +509,7 @@
}
#endif
+ mutex_exit(&sc->sc_lock); /* for nextdma intr */
while (!nextdma_finished(nsc)) {
/* esp_dma_isactive(sc)) { */
NDTRACEIF (ndtrace_addc('w'));
@@ -602,7 +603,7 @@
}
out:
- ;
+ mutex_enter(&sc->sc_lock); /* for nextdma intr */
#ifdef ESP_DEBUG
/* esp_dma_nest--; */
Home |
Main Index |
Thread Index |
Old Index