From 204aba230ecae24f5d479cde1602597d8d321e01 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Thu, 27 Apr 2000 07:37:14 +0000 Subject: Some PHYs does not report any OUI/MODEL combo, recognize another such case --- sys/dev/mii/mii.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 625d8980fe2..59388fc65ae 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mii.c,v 1.7 2000/04/24 21:13:33 niklas Exp $ */ +/* $OpenBSD: mii.c,v 1.8 2000/04/27 07:37:13 niklas Exp $ */ /* $NetBSD: mii.c,v 1.9 1998/11/05 04:08:02 thorpej Exp $ */ /*- @@ -91,9 +91,13 @@ mii_phy_probe(parent, mii, capmask) * ARGH!! 3Com internal PHYs report 0/0 in their * ID registers! If we spot this, check to see * if the BMSR has reasonable data in it. + * And if that wasn't enough there are PHYs + * reporting 0xffff/0xffff too. */ - if (MII_OUI(ma.mii_id1, ma.mii_id2) == 0 && - MII_MODEL(ma.mii_id2) == 0) { + if ((MII_OUI(ma.mii_id1, ma.mii_id2) == 0 && + MII_MODEL(ma.mii_id2) == 0) || + (MII_OUI(ma.mii_id1, ma.mii_id2) == 0x3fffff && + MII_MODEL(ma.mii_id2) == 0x3f)) { int bmsr = (*mii->mii_readreg)(parent, ma.mii_phyno, MII_BMSR); if (bmsr == 0 || bmsr == 0xffff || -- cgit v1.2.3