diff options
author | yongari <yongari@FreeBSD.org> | 2011-11-22 23:27:59 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2011-11-22 23:27:59 +0000 |
commit | 3946e53dadc723ebbf76020baf1067e004ed37ab (patch) | |
tree | 29a866a136170d752ca372e1acb222b29db8ed98 /sys/dev/re | |
parent | b9a05d406664fbcd5eb679b99006eea5b095d3ee (diff) | |
download | FreeBSD-src-3946e53dadc723ebbf76020baf1067e004ed37ab.zip FreeBSD-src-3946e53dadc723ebbf76020baf1067e004ed37ab.tar.gz |
Perform media change after setting IFF_DRV_RUNNING flag. Without it,
driver would ignore the first link state update if controller
already established a link such that it would have to take
additional link state handling in re_tick().
Diffstat (limited to 'sys/dev/re')
-rw-r--r-- | sys/dev/re/if_re.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 45cd5eb..85e0772 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -3194,14 +3194,14 @@ re_init_locked(struct rl_softc *sc) if (sc->rl_testmode) return; - mii_mediachg(mii); - CSR_WRITE_1(sc, RL_CFG1, CSR_READ_1(sc, RL_CFG1) | RL_CFG1_DRVLOAD); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->rl_flags &= ~RL_FLAG_LINK; + mii_mediachg(mii); + sc->rl_watchdog_timer = 0; callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } |