diff --git a/sys/arch/i386/eisa/aha1742.c b/sys/arch/i386/eisa/aha1742.c index ed265dde987e..84f700629ec5 100644 --- a/sys/arch/i386/eisa/aha1742.c +++ b/sys/arch/i386/eisa/aha1742.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1742.c,v 1.27 1994/04/07 06:50:09 mycroft Exp $ + * $Id: aha1742.c,v 1.28 1994/04/08 18:22:18 mycroft Exp $ */ /* @@ -606,7 +606,10 @@ ahbintr(ahb) printf("ahbintr "); #endif /*AHBDEBUG */ - while (inb(port + G2STAT) & G2STAT_INT_PEND) { + if (!(inb(port + G2STAT) & G2STAT_INT_PEND)) + return 0; + + do { /* * First get all the information and then * acknowlege the interrupt @@ -667,7 +670,7 @@ ahbintr(ahb) untimeout((timeout_t)ahb_timeout, (caddr_t)ecb); ahb_done(ahb, ecb, stat != AHB_ECB_OK); } - } + } while (inb(port + G2STAT) & G2STAT_INT_PEND); return 1; } diff --git a/sys/arch/i386/isa/aha1542.c b/sys/arch/i386/isa/aha1542.c index 526fb9e504f2..acf15ba26c35 100644 --- a/sys/arch/i386/isa/aha1542.c +++ b/sys/arch/i386/isa/aha1542.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1542.c,v 1.25 1994/04/07 06:49:57 mycroft Exp $ + * $Id: aha1542.c,v 1.26 1994/04/08 18:22:15 mycroft Exp $ */ /* @@ -649,7 +649,7 @@ ahaintr(aha) stat = inb(AHA_INTR_PORT); outb(AHA_CTRL_STAT_PORT, AHA_IRST); if (!(stat & AHA_MBIF)) - return 1; + return -1; /* XXX */ #ifdef AHADEBUG printf("mbxin "); #endif /*AHADEBUG */ diff --git a/sys/arch/i386/isa/aha1742.c b/sys/arch/i386/isa/aha1742.c index ed265dde987e..84f700629ec5 100644 --- a/sys/arch/i386/isa/aha1742.c +++ b/sys/arch/i386/isa/aha1742.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1742.c,v 1.27 1994/04/07 06:50:09 mycroft Exp $ + * $Id: aha1742.c,v 1.28 1994/04/08 18:22:18 mycroft Exp $ */ /* @@ -606,7 +606,10 @@ ahbintr(ahb) printf("ahbintr "); #endif /*AHBDEBUG */ - while (inb(port + G2STAT) & G2STAT_INT_PEND) { + if (!(inb(port + G2STAT) & G2STAT_INT_PEND)) + return 0; + + do { /* * First get all the information and then * acknowlege the interrupt @@ -667,7 +670,7 @@ ahbintr(ahb) untimeout((timeout_t)ahb_timeout, (caddr_t)ecb); ahb_done(ahb, ecb, stat != AHB_ECB_OK); } - } + } while (inb(port + G2STAT) & G2STAT_INT_PEND); return 1; } diff --git a/sys/arch/i386/isa/bt742a.c b/sys/arch/i386/isa/bt742a.c index 3de050c9c288..69324d7689c6 100644 --- a/sys/arch/i386/isa/bt742a.c +++ b/sys/arch/i386/isa/bt742a.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: bt742a.c,v 1.23 1994/04/07 06:50:19 mycroft Exp $ + * $Id: bt742a.c,v 1.24 1994/04/08 18:22:20 mycroft Exp $ */ /* @@ -677,8 +677,8 @@ btintr(bt) break; delay(10); } - if (i == 0) { - printf("%s: bt_intr, cmd/data port full\n", + if (!i) { + printf("%s: btintr, cmd/data port full\n", bt->sc_dev.dv_xname); outb(BT_CTRL_STAT_PORT, BT_SRST); return 1; @@ -690,7 +690,7 @@ btintr(bt) } if (!(stat & BT_MBIF)) { outb(BT_CTRL_STAT_PORT, BT_IRST); - return 1; + return -1; /* XXX */ } /* * If it IS then process the competed operation diff --git a/sys/arch/i386/isa/fd.c b/sys/arch/i386/isa/fd.c index 8c257e43da1c..87c2e6caaf16 100644 --- a/sys/arch/i386/isa/fd.c +++ b/sys/arch/i386/isa/fd.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.36 1994/04/07 06:50:32 mycroft Exp $ + * $Id: fd.c,v 1.37 1994/04/08 18:22:23 mycroft Exp $ */ #include @@ -750,7 +750,7 @@ fdcintr(fdc) /* call the state machine until it returns 0 */ while (fdcstate(fdc)); /* XXX need a more useful return value */ - return 1; + return -1; } int diff --git a/sys/arch/i386/isa/if_el.c b/sys/arch/i386/isa/if_el.c index 68be22459e15..be3960a0bafb 100644 --- a/sys/arch/i386/isa/if_el.c +++ b/sys/arch/i386/isa/if_el.c @@ -9,7 +9,7 @@ /* * 3COM Etherlink 3C501 device driver * - * $Id: if_el.c,v 1.9 1994/04/07 06:50:46 mycroft Exp $ + * $Id: if_el.c,v 1.10 1994/04/08 18:22:24 mycroft Exp $ */ /* @@ -497,7 +497,7 @@ elintr(sc) if (stat & EL_AS_RXBUSY) { (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 0; } done = 0; @@ -506,7 +506,7 @@ elintr(sc) if (rxstat & EL_RXS_STALE) { (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* If there's an overflow, reinit the board. */ @@ -522,7 +522,7 @@ elintr(sc) outb(iobase+EL_RBC, 0); (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* Incoming packet. */ @@ -544,7 +544,7 @@ elintr(sc) outb(iobase+EL_RBC, 0); (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } sc->sc_arpcom.ac_if.if_ipackets++; @@ -574,7 +574,7 @@ elintr(sc) (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* diff --git a/sys/arch/i386/isa/mcd.c b/sys/arch/i386/isa/mcd.c index 019dce1da16e..cb664e408fb9 100644 --- a/sys/arch/i386/isa/mcd.c +++ b/sys/arch/i386/isa/mcd.c @@ -35,7 +35,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.9 1994/04/07 06:51:02 mycroft Exp $ + * $Id: mcd.c,v 1.10 1994/04/08 18:22:26 mycroft Exp $ */ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ @@ -825,6 +825,8 @@ mcdintr(sc) /* Just read out status and ignore the rest. */ if (inb(iobase + mcd_xfer) != 0xff) (void) inb(iobase + mcd_status); + + return -1; } /* diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c index ed265dde987e..84f700629ec5 100644 --- a/sys/dev/eisa/aha1742.c +++ b/sys/dev/eisa/aha1742.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1742.c,v 1.27 1994/04/07 06:50:09 mycroft Exp $ + * $Id: aha1742.c,v 1.28 1994/04/08 18:22:18 mycroft Exp $ */ /* @@ -606,7 +606,10 @@ ahbintr(ahb) printf("ahbintr "); #endif /*AHBDEBUG */ - while (inb(port + G2STAT) & G2STAT_INT_PEND) { + if (!(inb(port + G2STAT) & G2STAT_INT_PEND)) + return 0; + + do { /* * First get all the information and then * acknowlege the interrupt @@ -667,7 +670,7 @@ ahbintr(ahb) untimeout((timeout_t)ahb_timeout, (caddr_t)ecb); ahb_done(ahb, ecb, stat != AHB_ECB_OK); } - } + } while (inb(port + G2STAT) & G2STAT_INT_PEND); return 1; } diff --git a/sys/dev/isa/aha1542.c b/sys/dev/isa/aha1542.c index 526fb9e504f2..acf15ba26c35 100644 --- a/sys/dev/isa/aha1542.c +++ b/sys/dev/isa/aha1542.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: aha1542.c,v 1.25 1994/04/07 06:49:57 mycroft Exp $ + * $Id: aha1542.c,v 1.26 1994/04/08 18:22:15 mycroft Exp $ */ /* @@ -649,7 +649,7 @@ ahaintr(aha) stat = inb(AHA_INTR_PORT); outb(AHA_CTRL_STAT_PORT, AHA_IRST); if (!(stat & AHA_MBIF)) - return 1; + return -1; /* XXX */ #ifdef AHADEBUG printf("mbxin "); #endif /*AHADEBUG */ diff --git a/sys/dev/isa/bt742a.c b/sys/dev/isa/bt742a.c index 3de050c9c288..69324d7689c6 100644 --- a/sys/dev/isa/bt742a.c +++ b/sys/dev/isa/bt742a.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: bt742a.c,v 1.23 1994/04/07 06:50:19 mycroft Exp $ + * $Id: bt742a.c,v 1.24 1994/04/08 18:22:20 mycroft Exp $ */ /* @@ -677,8 +677,8 @@ btintr(bt) break; delay(10); } - if (i == 0) { - printf("%s: bt_intr, cmd/data port full\n", + if (!i) { + printf("%s: btintr, cmd/data port full\n", bt->sc_dev.dv_xname); outb(BT_CTRL_STAT_PORT, BT_SRST); return 1; @@ -690,7 +690,7 @@ btintr(bt) } if (!(stat & BT_MBIF)) { outb(BT_CTRL_STAT_PORT, BT_IRST); - return 1; + return -1; /* XXX */ } /* * If it IS then process the competed operation diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 68be22459e15..be3960a0bafb 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -9,7 +9,7 @@ /* * 3COM Etherlink 3C501 device driver * - * $Id: if_el.c,v 1.9 1994/04/07 06:50:46 mycroft Exp $ + * $Id: if_el.c,v 1.10 1994/04/08 18:22:24 mycroft Exp $ */ /* @@ -497,7 +497,7 @@ elintr(sc) if (stat & EL_AS_RXBUSY) { (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 0; } done = 0; @@ -506,7 +506,7 @@ elintr(sc) if (rxstat & EL_RXS_STALE) { (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* If there's an overflow, reinit the board. */ @@ -522,7 +522,7 @@ elintr(sc) outb(iobase+EL_RBC, 0); (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* Incoming packet. */ @@ -544,7 +544,7 @@ elintr(sc) outb(iobase+EL_RBC, 0); (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } sc->sc_arpcom.ac_if.if_ipackets++; @@ -574,7 +574,7 @@ elintr(sc) (void)inb(iobase+EL_RXC); outb(iobase+EL_AC, EL_AC_IRQE | EL_AC_RX); - return; + return 1; } /* diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 019dce1da16e..cb664e408fb9 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -35,7 +35,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.9 1994/04/07 06:51:02 mycroft Exp $ + * $Id: mcd.c,v 1.10 1994/04/08 18:22:26 mycroft Exp $ */ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ @@ -825,6 +825,8 @@ mcdintr(sc) /* Just read out status and ignore the rest. */ if (inb(iobase + mcd_xfer) != 0xff) (void) inb(iobase + mcd_status); + + return -1; } /*