--- src/sys/dev/netif/plip/if_plip.c 2005/05/24 20:59:02 1.11 +++ src/sys/dev/netif/plip/if_plip.c 2005/06/13 14:00:29 1.12 @@ -90,6 +90,7 @@ #include #include #include +#include #include #include @@ -455,12 +456,12 @@ lp_intr (void *arg) device_t dev = (device_t)arg; device_t ppbus = device_get_parent(dev); struct lp_data *sc = DEVTOSOFTC(dev); - int len, s, j; + int len, j; u_char *bp; u_char c, cl; struct mbuf *top; - s = splhigh(); + crit_enter(); if (sc->sc_if.if_flags & IFF_LINK0) { @@ -575,7 +576,7 @@ lp_intr (void *arg) } done: - splx(s); + crit_exit(); return; } @@ -599,7 +600,7 @@ lpoutput (struct ifnet *ifp, struct mbuf { device_t dev = UNITODEVICE(ifp->if_dunit); device_t ppbus = device_get_parent(dev); - int s, err; + int err; struct mbuf *mm; u_char *cp = "\0\0"; u_char chksum = 0; @@ -612,7 +613,7 @@ lpoutput (struct ifnet *ifp, struct mbuf err = 1; /* assume we're aborting because of an error */ - s = splhigh(); + crit_enter(); /* Suspend (on laptops) or receive-errors might have taken us offline */ ppb_wctr(ppbus, IRQENABLE); @@ -695,7 +696,7 @@ lpoutput (struct ifnet *ifp, struct mbuf lprintf("^"); lp_intr(dev); } - (void) splx(s); + crit_exit(); return 0; } @@ -741,7 +742,7 @@ lpoutput (struct ifnet *ifp, struct mbuf lp_intr(dev); } - (void) splx(s); + crit_exit(); return 0; }