Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/pcmcia Pullup 1.41 [jonathan]:



details:   https://anonhg.NetBSD.org/src/rev/99fa8157e64a
branches:  netbsd-1-5
changeset: 489759:99fa8157e64a
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Oct 17 00:56:32 2000 +0000

description:
Pullup 1.41 [jonathan]:
Fix wi_intr() to avoid touching card registers during insert/remove events,
when sharing an interrupt with other devices:
check sc->sc_enabled,  and drop the interrupt if its' off.

Also check for IFF_RUNNING, on advice of Enami Tsugotomo.

diffstat:

 sys/dev/pcmcia/if_wi.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 284a174a5d90 -r 99fa8157e64a sys/dev/pcmcia/if_wi.c
--- a/sys/dev/pcmcia/if_wi.c    Tue Oct 17 00:53:35 2000 +0000
+++ b/sys/dev/pcmcia/if_wi.c    Tue Oct 17 00:56:32 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wi.c,v 1.21.2.6 2000/08/22 02:32:45 enami Exp $     */
+/*     $NetBSD: if_wi.c,v 1.21.2.7 2000/10/17 00:56:32 tv Exp $        */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -660,7 +660,9 @@
        struct ifnet            *ifp;
        u_int16_t               status;
 
-       if ((sc->sc_dev.dv_flags & DVF_ACTIVE) == 0)
+       if (sc->sc_enabled == 0 ||
+           (sc->sc_dev.dv_flags & DVF_ACTIVE) == 0 ||
+           (sc->sc_ethercom.ec_if.if_flags & IFF_RUNNING) == 0)
                return (0);
 
        ifp = &sc->sc_ethercom.ec_if;



Home | Main Index | Thread Index | Old Index