From 6822ccd6e7f3956f40fc010cca9410a8e10c1e2e Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Fri, 19 Nov 1999 05:37:37 +0000 Subject: [PATCH] protect some more operations with splimp() under Netgraph. --- sys/dev/ar/if_ar.c | 6 +++--- sys/dev/ar/if_ar_isa.c | 6 +++--- sys/dev/sr/if_sr.c | 6 +++--- sys/dev/sr/if_sr_isa.c | 6 +++--- sys/i386/isa/if_ar.c | 6 +++--- sys/i386/isa/if_sr.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c index 4d27d728a70a..79bfbba29f7f 100644 --- a/sys/dev/ar/if_ar.c +++ b/sys/dev/ar/if_ar.c @@ -2137,13 +2137,13 @@ ngar_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "ar%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); arwatchdog(sc); #if 0 - s = splimp(); ar_down(sc); ar_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -2304,8 +2304,8 @@ ngar_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); arstart(sc); + splx(s); return (0); bad: diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c index 4d27d728a70a..79bfbba29f7f 100644 --- a/sys/dev/ar/if_ar_isa.c +++ b/sys/dev/ar/if_ar_isa.c @@ -2137,13 +2137,13 @@ ngar_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "ar%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); arwatchdog(sc); #if 0 - s = splimp(); ar_down(sc); ar_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -2304,8 +2304,8 @@ ngar_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); arstart(sc); + splx(s); return (0); bad: diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c index 1827793ff204..0bcc23b95bb9 100644 --- a/sys/dev/sr/if_sr.c +++ b/sys/dev/sr/if_sr.c @@ -3296,13 +3296,13 @@ ngsr_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "sr%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); srwatchdog(sc); #if 0 - s = splimp(); sr_down(sc); sr_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -3466,8 +3466,8 @@ ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); srstart(sc); + splx(s); return (0); bad: diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c index 1827793ff204..0bcc23b95bb9 100644 --- a/sys/dev/sr/if_sr_isa.c +++ b/sys/dev/sr/if_sr_isa.c @@ -3296,13 +3296,13 @@ ngsr_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "sr%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); srwatchdog(sc); #if 0 - s = splimp(); sr_down(sc); sr_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -3466,8 +3466,8 @@ ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); srstart(sc); + splx(s); return (0); bad: diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c index 4d27d728a70a..79bfbba29f7f 100644 --- a/sys/i386/isa/if_ar.c +++ b/sys/i386/isa/if_ar.c @@ -2137,13 +2137,13 @@ ngar_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "ar%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); arwatchdog(sc); #if 0 - s = splimp(); ar_down(sc); ar_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -2304,8 +2304,8 @@ ngar_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); arstart(sc); + splx(s); return (0); bad: diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c index 1827793ff204..0bcc23b95bb9 100644 --- a/sys/i386/isa/if_sr.c +++ b/sys/i386/isa/if_sr.c @@ -3296,13 +3296,13 @@ ngsr_watchdog_frame(void * arg) if (sc->out_dog == 0) { log(LOG_ERR, "sr%d: Transmit failure.. no clock?\n", sc->unit); + s = splimp(); srwatchdog(sc); #if 0 - s = splimp(); sr_down(sc); sr_up(sc); - splx(s); #endif + splx(s); sc->inlast = sc->out_deficit = 0; } else { sc->out_dog--; @@ -3466,8 +3466,8 @@ ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) goto bad; } IF_ENQUEUE(xmitq_p, m); - splx(s); srstart(sc); + splx(s); return (0); bad: