Don't reinitialize the hardware if only PROMISC flag was changed.
Previously whenever PROMISC mode turned on/off link renegotiation occurs and it could resulted in network unavailability for serveral seconds.(Depending on switch STP settings it could last several tens seconds.) Reported by: Prokofiev S.P. < proks AT logos DOT uptel DOT net > Tested by: Prokofiev S.P. < proks AT logos DOT uptel DOT net >
This commit is contained in:
parent
b85dc1755d
commit
8c9ec0ed49
@ -2509,10 +2509,18 @@ re_ioctl(ifp, command, data)
|
||||
break;
|
||||
case SIOCSIFFLAGS:
|
||||
RL_LOCK(sc);
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
re_init_locked(sc);
|
||||
else if (ifp->if_drv_flags & IFF_DRV_RUNNING)
|
||||
re_stop(sc);
|
||||
if ((ifp->if_flags & IFF_UP) != 0) {
|
||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
|
||||
if (((ifp->if_flags ^ sc->rl_if_flags)
|
||||
& IFF_PROMISC) != 0)
|
||||
re_setmulti(sc);
|
||||
} else
|
||||
re_init_locked(sc);
|
||||
} else {
|
||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
|
||||
re_stop(sc);
|
||||
}
|
||||
sc->rl_if_flags = ifp->if_flags;
|
||||
RL_UNLOCK(sc);
|
||||
break;
|
||||
case SIOCADDMULTI:
|
||||
|
@ -728,6 +728,7 @@ struct rl_softc {
|
||||
uint32_t rl_hwrev;
|
||||
uint32_t rl_rxlenmask;
|
||||
int rl_testmode;
|
||||
int rl_if_flags;
|
||||
int suspended; /* 0 = normal 1 = suspended */
|
||||
#ifdef DEVICE_POLLING
|
||||
int rxcycles;
|
||||
|
Loading…
x
Reference in New Issue
Block a user