Fix return values from some interrupt routines.

This commit is contained in:
mycroft 1994-04-08 18:22:15 +00:00
parent 78d7559413
commit 55efebae3e
12 changed files with 50 additions and 37 deletions

View File

@ -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;
}

View File

@ -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 */

View File

@ -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;
}

View File

@ -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

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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;
}
/*

View File

@ -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;
}
/*

View File

@ -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;
}

View File

@ -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 */

View File

@ -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

View File

@ -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;
}
/*

View File

@ -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;
}
/*