diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-02-16 05:06:02 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-02-16 05:06:02 +0000 |
commit | c440f13861867629f9802ee49df9d77652faf4df (patch) | |
tree | 7826c1e45b93afe9167766e27c8590460150f723 /sys/dev/mii | |
parent | 2804db10cf0502608668bd16251afc680a5a1859 (diff) |
match broadcom 3c905c phy
Diffstat (limited to 'sys/dev/mii')
-rw-r--r-- | sys/dev/mii/exphy.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c index 3ba7b351c10..55ccad79aff 100644 --- a/sys/dev/mii/exphy.c +++ b/sys/dev/mii/exphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exphy.c,v 1.6 1999/12/07 22:01:28 jason Exp $ */ +/* $OpenBSD: exphy.c,v 1.7 2000/02/16 05:06:01 jason Exp $ */ /* $NetBSD: exphy.c,v 1.15.6.1 1999/04/23 15:39:33 perry Exp $ */ /*- @@ -110,8 +110,10 @@ exphymatch(parent, match, aux) /* * Argh, 3Com PHY reports oui == 0 model == 0! */ - 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) != MII_OUI_BROADCOM || + MII_MODEL(ma->mii_id2) != MII_MODEL_BROADCOM_3C905C)) return (0); /* @@ -132,7 +134,15 @@ exphyattach(parent, self, aux) struct mii_attach_args *ma = aux; struct mii_data *mii = ma->mii_data; - printf(": 3Com internal media interface\n"); + if (MII_OUI(ma->mii_id1, ma->mii_id2) == 0 && + MII_MODEL(ma->mii_id2) == 0) + printf(": 3Com internal media interface\n"); + else if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_BROADCOM && + MII_MODEL(ma->mii_id2) == MII_MODEL_BROADCOM_3C905C) + printf(": %s, rev. %d\n", MII_STR_BROADCOM_3C905C, + MII_REV(ma->mii_id2)); + else + printf(": unknown phy\n"); sc->mii_inst = mii->mii_instance; sc->mii_phy = ma->mii_phyno; |