From 536fde34650b18ec4425ea6e2e559e46fd303431 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Thu, 18 Aug 2005 14:29:01 +0000 Subject: [PATCH] In re_shutdown() mark interface as down since otherwise we will panic if interrupt comes in later on, which can happen in some uncommon cases. Another possible fix is to call re_detach() instead of re_stop(), like ve(4) does, but I am not sure if the latter is really RTTD, so that stick with this one-liner for now. PR: kern/80005 Approved by: silence on -arch, no reply from selected network gurus --- sys/dev/re/if_re.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index ca6bb1b29c4d..f9f0e0f0fd5e 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -2490,5 +2490,12 @@ re_shutdown(dev) RL_LOCK(sc); re_stop(sc); + /* + * Mark interface as down since otherwise we will panic if + * interrupt comes in later on, which can happen in some + * cases. Another option is to call re_detach() instead of + * re_stop(), like ve(4) does. + */ + sc->rl_ifp->if_flags &= ~IFF_UP; RL_UNLOCK(sc); }