Skip to content

Commit

Permalink
Fix silent stall of next68k esp(4) SCSI.
Browse files Browse the repository at this point in the history
next68k esp(4) driver requires nextdma(4) interrupts at ipl 6
during ncr53c9x_intr() for esp(4) at ipl 3.  It worked before
netbsd-6, 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) so nextdma interrupts were no longer allowed during
ncr53c9x interrupt hander.

For now, just call mutex_exit(9) and mutex_enter(9) during
wating nextdma(4) interrupts in esp_dma_intr() handler.
This could be wrong and the interrupt hander for nextdma should
be reorganized, but it just works.
  • Loading branch information
tsutsui committed Jan 20, 2023
1 parent 458feeb commit a5dcbaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/arch/next68k/dev/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
}
#endif

mutex_exit(&sc->sc_lock); /* for nextdma intr */
while (!nextdma_finished(nsc)) {
/* esp_dma_isactive(sc)) { */
NDTRACEIF (ndtrace_addc('w'));
Expand Down Expand Up @@ -602,7 +603,7 @@ esp_dma_intr(struct ncr53c9x_softc *sc)

}
out:
;
mutex_enter(&sc->sc_lock); /* for nextdma intr */

#ifdef ESP_DEBUG
/* esp_dma_nest--; */
Expand Down

0 comments on commit a5dcbaa

Please sign in to comment.