summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/mii.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2004-11-26 19:42:40 +0000
committerbz <bz@FreeBSD.org>2004-11-26 19:42:40 +0000
commit234f298867720542dc236f70a33aea2cc0a2c32f (patch)
treef09a7d2ee919373d66cfaea69e3da0cd1eeb1a1f /sys/dev/mii/mii.c
parent266790a06d318bb40d1956be5fbabb4e933f9f73 (diff)
downloadFreeBSD-src-234f298867720542dc236f70a33aea2cc0a2c32f.zip
FreeBSD-src-234f298867720542dc236f70a33aea2cc0a2c32f.tar.gz
With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in from
NetBSD got activated. NetBSD has an additional change in their mii.c rev 1.26 which got missed with that merger: : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well, : not just the media mask. This prevents PHYs/TBIs that only support : Gigabit media from slipping through the cracks. With this GE only ones like from the SK-9844 are detected again. PR: i386/63313, i386/71733, kern/73725 Tested by: matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov> Approved by: rwatson (mentor) Obtained from: NetBSD mii.c rev 1.26 MFC after: 1 week
Diffstat (limited to 'sys/dev/mii/mii.c')
-rw-r--r--sys/dev/mii/mii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index e3d782b..4a5b07c 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -125,7 +125,7 @@ miibus_probe(dev)
*/
bmsr = MIIBUS_READREG(parent, ma.mii_phyno, MII_BMSR);
if (bmsr == 0 || bmsr == 0xffff ||
- (bmsr & BMSR_MEDIAMASK) == 0) {
+ (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) {
/* Assume no PHY at this address. */
continue;
}
@@ -316,7 +316,7 @@ mii_phy_probe(dev, child, ifmedia_upd, ifmedia_sts)
for (i = 0; i < MII_NPHY; i++) {
bmsr = MIIBUS_READREG(dev, i, MII_BMSR);
if (bmsr == 0 || bmsr == 0xffff ||
- (bmsr & BMSR_MEDIAMASK) == 0) {
+ (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) {
/* Assume no PHY at this address. */
continue;
} else
OpenPOWER on IntegriCloud