Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Detach rnd source in ep_detach(). Check for DVF_...



details:   https://anonhg.NetBSD.org/src/rev/9e0e67eeb906
branches:  trunk
changeset: 481587:9e0e67eeb906
user:      augustss <augustss%NetBSD.org@localhost>
date:      Wed Feb 02 11:00:48 2000 +0000

description:
Detach rnd source in ep_detach().  Check for DVF_ACTIVE in epintr();

diffstat:

 sys/dev/ic/elink3.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 8338b24612d5 -r 9e0e67eeb906 sys/dev/ic/elink3.c
--- a/sys/dev/ic/elink3.c       Wed Feb 02 10:50:56 2000 +0000
+++ b/sys/dev/ic/elink3.c       Wed Feb 02 11:00:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elink3.c,v 1.71 2000/02/02 08:57:51 augustss Exp $     */
+/*     $NetBSD: elink3.c,v 1.72 2000/02/02 11:00:48 augustss Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1393,7 +1393,8 @@
        int ret = 0;
        int addrandom = 0;
 
-       if (sc->enabled == 0)
+       if (sc->enabled == 0 ||
+           (sc->sc_dev.dv_flags & DVF_ACTIVE) == 0)
                return (0);
 
        for (;;) {
@@ -2141,6 +2142,10 @@
        untimeout(epmbuffill, sc);
 
        ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
+
+#if NRND > 0
+       rnd_detach_source(&sc->rnd_source);
+#endif
 #if NBPFILTER > 0
        bpfdetach(ifp);
 #endif



Home | Main Index | Thread Index | Old Index