Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/obio Remove some register declarations.
details: https://anonhg.NetBSD.org/src/rev/01567baf892e
branches: trunk
changeset: 473599:01567baf892e
user: briggs <briggs%NetBSD.org@localhost>
date: Wed Jun 09 03:41:34 1999 +0000
description:
Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.
diffstat:
sys/arch/mac68k/obio/esp.c | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diffs (66 lines):
diff -r 0b8c18a9c3c1 -r 01567baf892e sys/arch/mac68k/obio/esp.c
--- a/sys/arch/mac68k/obio/esp.c Wed Jun 09 03:01:21 1999 +0000
+++ b/sys/arch/mac68k/obio/esp.c Wed Jun 09 03:41:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esp.c,v 1.21 1999/06/01 03:40:12 briggs Exp $ */
+/* $NetBSD: esp.c,v 1.22 1999/06/09 03:41:34 briggs Exp $ */
/*
* Copyright (c) 1997 Jason R. Thorpe.
@@ -399,11 +399,11 @@
esp_dma_intr(sc)
struct ncr53c9x_softc *sc;
{
- register struct esp_softc *esc = (struct esp_softc *)sc;
- register u_char *p;
+ struct esp_softc *esc = (struct esp_softc *)sc;
volatile u_char *cmdreg, *intrreg, *statreg, *fiforeg;
- register u_int espphase, espstat, espintr;
- register int cnt;
+ u_char *p;
+ u_int espphase, espstat, espintr;
+ int cnt, s;
if (esc->sc_active == 0) {
printf("dma_intr--inactive DMA\n");
@@ -450,11 +450,13 @@
if (esc->sc_active) {
while (!(*statreg & 0x80));
+ s = splhigh();
espstat = *statreg;
espintr = *intrreg;
espphase = (espintr & NCRINTR_DIS)
? /* Disconnected */ BUSFREE_PHASE
: espstat & PHASE_MASK;
+ splx(s);
}
} while (esc->sc_active && (espintr & NCRINTR_BS));
sc->sc_phase = espphase;
@@ -708,11 +710,22 @@
esp_dualbus_intr(sc)
register struct ncr53c9x_softc *sc;
{
- if (esp0 && (esp0->sc_reg[NCR_STAT * 16] & 0x80))
- ncr53c9x_intr((struct ncr53c9x_softc *) esp0);
+ int i = 0;
+
+ do {
+ if (esp0 && (esp0->sc_reg[NCR_STAT * 16] & 0x80)) {
+ ncr53c9x_intr((struct ncr53c9x_softc *) esp0);
+ i++;
+ }
- if (esp1 && (esp1->sc_reg[NCR_STAT * 16] & 0x80))
- ncr53c9x_intr((struct ncr53c9x_softc *) esp1);
+ if (esp1 && (esp1->sc_reg[NCR_STAT * 16] & 0x80)) {
+ ncr53c9x_intr((struct ncr53c9x_softc *) esp1);
+ i++;
+ }
+ if (!i) {
+ delay(100); i++;
+ }
+ } while (!i);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index