NetBSD-Bugs archive

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

Re: kern/42068: fxp address adding or removing causes link changes



The following reply was made to PR kern/42068; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: dyoung%NetBSD.org@localhost
Subject: Re: kern/42068: fxp address adding or removing causes link changes
Date: Tue, 29 Dec 2009 09:26:14 +0100

 --zhXaljGHf11kAtnf
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Hi Gabor,
 
 the attached patch against -current (and only very lightly tested) seems to
 work for me. Could you test if this fixes it for you too please?
 
 Dave, could you please review?
 
 Thanks,
 
 Martin
 
 --zhXaljGHf11kAtnf
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch
 
 Index: i82557.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/i82557.c,v
 retrieving revision 1.130
 diff -c -u -p -r1.130 i82557.c
 --- i82557.c   15 Sep 2009 19:20:30 -0000      1.130
 +++ i82557.c   29 Dec 2009 08:24:02 -0000
 @@ -2186,10 +2186,11 @@ fxp_ioctl(struct ifnet *ifp, u_long cmd,
  {
        struct fxp_softc *sc = ifp->if_softc;
        struct ifreq *ifr = (struct ifreq *)data;
 -      int s, error;
 +      int s, error, allm;
  
        s = splnet();
  
 +      allm = ifp->if_flags & IFF_ALLMULTI;
        switch (cmd) {
        case SIOCSIFMEDIA:
        case SIOCGIFMEDIA:
 @@ -2213,7 +2214,13 @@ fxp_ioctl(struct ifnet *ifp, u_long cmd,
                                sc->sc_flags |= FXPF_WANTINIT;
                                tsleep(sc, PSOCK, "fxp_init", 0);
                        }
 -                      error = fxp_init(ifp);
 +
 +                      ifp->if_timer = 0;
 +                      ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
 +                      callout_stop(&sc->sc_callout);
 +                      fxp_mc_setup(sc);
 +                      if ((ifp->if_flags & IFF_ALLMULTI) != allm)
 +                              error = fxp_init(ifp);
                }
                break;
        }
 
 --zhXaljGHf11kAtnf--
 


Home | Main Index | Thread Index | Old Index