diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-05 17:12:42 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-05 17:12:42 +0000 |
commit | 200f1c42c07cb51605a6dfa4df40d0565fc7b096 (patch) | |
tree | c3f76f0627a18740fbe33e12f973a1999cb4f6f0 /sys/dev/isa | |
parent | 6b192991e3349cab22ab2537adb8ca14caa175df (diff) |
More scsi_done() at SPLBIO. If you poll by manually calling the
interrupt function, wrap the call in splbio/splx!
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/wds.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 9b14b251eaa..1ec6603b487 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.23 2006/11/28 23:59:45 dlg Exp $ */ +/* $OpenBSD: wds.c,v 1.24 2007/11/05 17:12:41 krw Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -1355,6 +1355,7 @@ wds_poll(sc, xs, count) { bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; + int s; /* timeouts are in msec, so we loop in 1000 usec cycles */ while (count) { @@ -1362,8 +1363,11 @@ wds_poll(sc, xs, count) * If we had interrupts enabled, would we * have got an interrupt? */ - if (bus_space_read_1(iot, ioh, WDS_STAT) & WDSS_IRQ) + if (bus_space_read_1(iot, ioh, WDS_STAT) & WDSS_IRQ) { + s = splbio(); wdsintr(sc); + splx(s); + } if (xs->flags & ITSDONE) return 0; delay(1000); /* only happens in boot so ok */ @@ -1383,6 +1387,7 @@ wds_ipoll(sc, scb, count) { bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; + int s; /* timeouts are in msec, so we loop in 1000 usec cycles */ while (count) { @@ -1390,8 +1395,11 @@ wds_ipoll(sc, scb, count) * If we had interrupts enabled, would we * have got an interrupt? */ - if (bus_space_read_1(iot, ioh, WDS_STAT) & WDSS_IRQ) + if (bus_space_read_1(iot, ioh, WDS_STAT) & WDSS_IRQ) { + s = splbio(); wdsintr(sc); + splx(s); + } if (scb->flags & SCB_DONE) return 0; delay(1000); /* only happens in boot so ok */ |