diff options
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/i82596.c | 20 | ||||
-rw-r--r-- | sys/dev/ic/i82596var.h | 9 |
2 files changed, 16 insertions, 13 deletions
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 1ce274fea96..c48f419c259 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596.c,v 1.11 2002/07/31 02:32:25 mickey Exp $ */ +/* $OpenBSD: i82596.c,v 1.12 2002/09/23 06:11:50 mickey Exp $ */ /* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -523,12 +523,6 @@ i82596_intr(v) register u_int status; register int off; - /* - * Implementation dependent interrupt handling. - */ - if (sc->intrhook) - (sc->intrhook)(sc, IE_INTR_ENTER); - off = IE_SCB_STATUS(sc->scb); PURGE(sc->bh + off, 2); bus_space_barrier(sc->bt, sc->bh, off, 2, BUS_SPACE_BARRIER_READ); @@ -548,13 +542,21 @@ loop: #endif i82596_start_cmd(sc, status & IE_ST_WHENCE, 0, 0, 1); - if (status & (IE_ST_FR | IE_ST_RNR)) + if (status & (IE_ST_FR | IE_ST_RNR)) { + if (sc->intrhook) + (sc->intrhook)(sc, IE_INTR_ENRCV); + if (i82596_rint(sc, status) != 0) goto reset; + } + + if (status & IE_ST_CX) { + if (sc->intrhook) + (sc->intrhook)(sc, IE_INTR_ENSND); - if (status & IE_ST_CX) if (i82596_tint(sc, status) != 0) goto reset; + } #ifdef I82596_DEBUG if ((status & IE_ST_CNA) && (sc->sc_debug & IED_CNA)) diff --git a/sys/dev/ic/i82596var.h b/sys/dev/ic/i82596var.h index fc6b3a9e304..053ae043b8a 100644 --- a/sys/dev/ic/i82596var.h +++ b/sys/dev/ic/i82596var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596var.h,v 1.7 2002/03/14 03:16:04 millert Exp $ */ +/* $OpenBSD: i82596var.h,v 1.8 2002/09/23 06:11:50 mickey Exp $ */ /* $NetBSD: i82586var.h,v 1.10 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -120,9 +120,10 @@ #define IE_MAXMCAST (IE_TBUF_SIZE/6)/* must fit in transmit buffer */ -#define IE_INTR_ENTER 0 /* intr hook called on ISR entry */ -#define IE_INTR_EXIT 1 /* intr hook called on ISR exit */ -#define IE_INTR_LOOP 2 /* intr hook called on ISR loop */ +#define IE_INTR_ENRCV 1 /* receive pkt interrupt */ +#define IE_INTR_ENSND 2 /* send pkt interrupt */ +#define IE_INTR_LOOP 3 /* a loop for next one*/ +#define IE_INTR_EXIT 4 /* done w/ interrupts */ #define IE_CHIP_PROBE 0 /* reset called from chip probe */ #define IE_CARD_RESET 1 /* reset called from card reset */ |