summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-27 07:37:14 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-27 07:37:14 +0000
commit204aba230ecae24f5d479cde1602597d8d321e01 (patch)
treeafa58f37ccbc31780e38dc34258577c367d14e97
parent8fe79b174413cc0aa244bc16941c6b1f105cadd4 (diff)
Some PHYs does not report any OUI/MODEL combo, recognize another such case
-rw-r--r--sys/dev/mii/mii.c10
1 files 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 ||