svn commit: r233689 - head/sys/dev/ale
Pyun YongHyeon
yongari at FreeBSD.org
Fri Mar 30 05:27:06 UTC 2012
Author: yongari
Date: Fri Mar 30 05:27:05 2012
New Revision: 233689
URL: http://svn.freebsd.org/changeset/base/233689
Log:
Do not report current link status if driver is not running.
This change also workarounds dhclient's link state handling bug by
not giving current link status.
Unlike other controllers, ale(4)'s PHY hibernation perfectly works
such that driver does not see a valid link if the controller is not
brought up. If dhclient(8) runs on ale(4) it will blindly waits
until link UP and then gives up after 10 seconds. Because
dhclient(8) still thinks interface got a valid link when IFM_AVALID
is not set for selected media, this change makes dhclient initiate
DHCP without waiting for link UP.
Modified:
head/sys/dev/ale/if_ale.c
Modified: head/sys/dev/ale/if_ale.c
==============================================================================
--- head/sys/dev/ale/if_ale.c Fri Mar 30 04:46:39 2012 (r233688)
+++ head/sys/dev/ale/if_ale.c Fri Mar 30 05:27:05 2012 (r233689)
@@ -301,6 +301,10 @@ ale_mediastatus(struct ifnet *ifp, struc
sc = ifp->if_softc;
ALE_LOCK(sc);
+ if ((ifp->if_flags & IFF_UP) == 0) {
+ ALE_UNLOCK(sc);
+ return;
+ }
mii = device_get_softc(sc->ale_miibus);
mii_pollstat(mii);
More information about the svn-src-all
mailing list