X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/4020bf2482f63adea77933ec9027351ae0b0ec92..4b11abe3d2b0e79c52f4200114541976d4816bb0:/usr/src/sys/vax/if/if_en.c diff --git a/usr/src/sys/vax/if/if_en.c b/usr/src/sys/vax/if/if_en.c index 685c53a8ed..4df49c8fbf 100644 --- a/usr/src/sys/vax/if/if_en.c +++ b/usr/src/sys/vax/if/if_en.c @@ -1,4 +1,4 @@ -/* if_en.c 4.41 82/03/15 */ +/* if_en.c 4.43 82/03/19 */ #include "en.h" @@ -240,21 +240,22 @@ enxint(unit) { register struct uba_device *ui = eninfo[unit]; register struct en_softc *es = &en_softc[unit]; - register struct endevice *addr; + register struct endevice *addr = (struct endevice *)ui->ui_addr; COUNT(ENXINT); if (es->es_oactive == 0) return; - addr = (struct endevice *)ui->ui_addr; - es->es_if.if_opackets++; - es->es_oactive = 0; - es->es_delay = 0; - es->es_mask = ~0; - if (addr->en_ostat&EN_OERROR) { + if (es->es_mask && (addr->en_ostat&EN_OERROR)) { es->es_if.if_oerrors++; if (es->es_if.if_oerrors % 100 == 0) printf("en%d: += 100 output errors\n", unit); + endocoll(unit); + return; } + es->es_if.if_opackets++; + es->es_oactive = 0; + es->es_delay = 0; + es->es_mask = ~0; if (es->es_ifuba.ifu_xtofree) { m_freem(es->es_ifuba.ifu_xtofree); es->es_ifuba.ifu_xtofree = 0; @@ -274,12 +275,20 @@ COUNT(ENXINT); encollide(unit) int unit; { - register struct en_softc *es = &en_softc[unit]; + struct en_softc *es = &en_softc[unit]; COUNT(ENCOLLIDE); es->es_if.if_collisions++; if (es->es_oactive == 0) return; + endocoll(unit); +} + +endocoll(unit) + int unit; +{ + register struct en_softc *es = &en_softc[unit]; + /* * Es_mask is a 16 bit number with n low zero bits, with * n the number of backoffs. When es_mask is 0 we have @@ -398,7 +407,7 @@ COUNT(ENRINT); #ifdef INET case ENPUP_IPTYPE: - setipintr(); + schednetisr(NETISR_IP); inq = &ipintrq; break; #endif