From: niklas Date: Thu, 27 Apr 2000 07:37:13 +0000 (+0000) Subject: Some PHYs does not report any OUI/MODEL combo, recognize another such case X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ff92f56f301114949b0f5619f004167d03ebd362;p=openbsd Some PHYs does not report any OUI/MODEL combo, recognize another such case --- 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 ||