summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-03-11 22:44:48 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-03-11 22:44:48 +0000
commit9a4a5d9cb58c5304eb8795365177865551d75569 (patch)
tree3ce3f9ecba327a3a7f119dc96e867f54600217ab
parent8396d7871ce26544eb8554d070277994d427a910 (diff)
splimp -> spltty/splnet
ok miod@
-rw-r--r--sys/net/if_sl.c22
-rw-r--r--sys/net/if_strip.c22
2 files changed, 22 insertions, 22 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 6d768ec69bb..7e4e02e6221 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.30 2006/01/04 06:04:42 canacar Exp $ */
+/* $OpenBSD: if_sl.c,v 1.31 2006/03/11 22:44:47 brad Exp $ */
/* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */
/*
@@ -58,9 +58,6 @@
* pinging you can use up all your bandwidth). Made low clist behavior
* more robust and slightly less likely to hang serial line.
* Sped up a bunch of things.
- *
- * Note that splimp() is used throughout to block both (tty) input
- * interrupts and network activity; thus, splimp must be >= spltty.
*/
#include "bpfilter.h"
@@ -232,7 +229,7 @@ sl_clone_create(ifc, unit)
#if NBPFILTER > 0
bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_SLIP, SLIP_HDRLEN);
#endif
- s = splimp();
+ s = splnet();
LIST_INSERT_HEAD(&sl_softc_list, sc, sc_list);
splx(s);
@@ -249,7 +246,7 @@ sl_clone_destroy(ifp)
if (sc->sc_ttyp != NULL)
return (EBUSY);
- s = splimp();
+ s = splnet();
LIST_REMOVE(sc, sc_list);
splx(s);
@@ -358,7 +355,7 @@ slclose(tp)
tp->t_line = 0;
sc = (struct sl_softc *)tp->t_sc;
if (sc != NULL) {
- s = splimp(); /* actually, max(spltty, splsoftnet) */
+ s = spltty();
if_down(&sc->sc_if);
sc->sc_ttyp = NULL;
@@ -447,7 +444,7 @@ sloutput(ifp, m, dst, rtp)
m_freem(m);
return (ENETRESET); /* XXX ? */
}
- s = splimp();
+ s = spltty();
if (sc->sc_oqlen && sc->sc_ttyp->t_outq.c_cc == sc->sc_oqlen) {
struct timeval tv, tm;
@@ -459,6 +456,8 @@ sloutput(ifp, m, dst, rtp)
slstart(sc->sc_ttyp);
}
}
+
+ (void) splnet();
IFQ_ENQUEUE(&sc->sc_if.if_snd, m, NULL, error);
if (error) {
splx(s);
@@ -466,6 +465,7 @@ sloutput(ifp, m, dst, rtp)
return (error);
}
+ (void) spltty();
getmicrotime(&sc->sc_lastpacket);
if ((sc->sc_oqlen = sc->sc_ttyp->t_outq.c_cc) == 0)
slstart(sc->sc_ttyp);
@@ -527,7 +527,7 @@ slstart(tp)
/*
* Get a packet and send it to the interface.
*/
- s = splimp();
+ s = splnet();
IF_DEQUEUE(&sc->sc_fastq, m);
if (m)
sc->sc_if.if_omcasts++; /* XXX */
@@ -875,7 +875,7 @@ slinput(c, tp)
sc->sc_if.if_ipackets++;
getmicrotime(&sc->sc_lastpacket);
- s = splimp();
+ s = splnet();
if (IF_QFULL(&ipintrq)) {
IF_DROP(&ipintrq);
sc->sc_if.if_ierrors++;
@@ -919,7 +919,7 @@ slioctl(ifp, cmd, data)
struct sl_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
struct ifreq *ifr;
- int s = splimp(), error = 0;
+ int s = splnet(), error = 0;
struct sl_stats *slsp;
switch (cmd) {
diff --git a/sys/net/if_strip.c b/sys/net/if_strip.c
index 63a35580407..75e3038d7a2 100644
--- a/sys/net/if_strip.c
+++ b/sys/net/if_strip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_strip.c,v 1.30 2004/06/24 19:35:25 tholo Exp $ */
+/* $OpenBSD: if_strip.c,v 1.31 2006/03/11 22:44:47 brad Exp $ */
/* $NetBSD: if_strip.c,v 1.2.4.3 1996/08/03 00:58:32 jtc Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
@@ -85,9 +85,6 @@
* pinging you can use up all your bandwidth). Made low clist behavior
* more robust and slightly less likely to hang serial line.
* Sped up a bunch of things.
- *
- * Note that splimp() is used throughout to block both (tty) input
- * interrupts and network activity; thus, splimp must be >= spltty.
*/
#include "strip.h"
@@ -507,7 +504,7 @@ stripclose(tp)
ttywflush(tp);
- s = splimp(); /* actually, max(spltty, splsoftnet) */
+ s = spltty();
tp->t_line = 0;
sc = (struct st_softc *)tp->t_sc;
if (sc != NULL) {
@@ -831,8 +828,7 @@ stripoutput(ifp, m, dst, rt)
bcopy((caddr_t)dldst, (caddr_t)shp->starmode_addr,
sizeof (shp->starmode_addr));
-
- s = splimp();
+ s = spltty();
if (sc->sc_oqlen && sc->sc_ttyp->t_outq.c_cc == sc->sc_oqlen) {
struct timeval tv, tm;
@@ -845,6 +841,8 @@ stripoutput(ifp, m, dst, rt)
stripstart(sc->sc_ttyp);
}
}
+
+ (void) splnet();
if (ifq != NULL) {
if (IF_QFULL(ifq)) {
IF_DROP(ifq);
@@ -861,6 +859,8 @@ stripoutput(ifp, m, dst, rt)
sc->sc_if.if_oerrors++;
return (error);
}
+
+ (void) spltty();
getmicrotime(&sc->sc_lastpacket);
if ((sc->sc_oqlen = sc->sc_ttyp->t_outq.c_cc) == 0) {
stripstart(sc->sc_ttyp);
@@ -945,7 +945,7 @@ stripstart(tp)
/*
* Get a packet and send it to the interface.
*/
- s = splimp();
+ s = splnet();
IF_DEQUEUE(&sc->sc_fastq, m);
if (m)
sc->sc_if.if_omcasts++; /* XXX */
@@ -1262,7 +1262,7 @@ stripinput(c, tp)
sc->sc_if.if_ipackets++;
getmicrotime(&sc->sc_lastpacket);
- s = splimp();
+ s = splnet();
if (IF_QFULL(&ipintrq)) {
IF_DROP(&ipintrq);
sc->sc_if.if_ierrors++;
@@ -1296,7 +1296,7 @@ stripioctl(ifp, cmd, data)
{
struct ifaddr *ifa = (struct ifaddr *)data;
struct ifreq *ifr;
- int s = splimp(), error = 0;
+ int s = splnet(), error = 0;
switch (cmd) {
@@ -1350,7 +1350,7 @@ stripioctl(ifp, cmd, data)
/*
* Set a radio into starmode.
- * XXX must be called at spltty() or higher (e.g., splimp()
+ * XXX must be called at spltty() or higher (e.g., splvm()
*/
void
strip_resetradio(sc, tp)