diff options
-rw-r--r-- | sys/dev/mii/exphy.c | 13 | ||||
-rw-r--r-- | sys/dev/mii/mii.c | 7 | ||||
-rw-r--r-- | sys/dev/mii/miidevs | 6 |
3 files changed, 19 insertions, 7 deletions
diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c index 9284c7a..ddf7d82 100644 --- a/sys/dev/mii/exphy.c +++ b/sys/dev/mii/exphy.c @@ -89,7 +89,7 @@ #if !defined(lint) static const char rcsid[] = - "$FreeBSD$"; + "$Id: exphy.c,v 1.1 1999/08/21 17:40:41 wpaul Exp $"; #endif static int exphy_probe __P((device_t)); @@ -130,8 +130,10 @@ static int exphy_probe(dev) /* * 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_3c905Cphy)) return (ENXIO); /* @@ -140,7 +142,10 @@ static int exphy_probe(dev) if (strcmp(device_get_name(parent), "xl") != 0) return (ENXIO); - device_set_desc(dev, "3Com internal media interface"); + if (MII_OUI(ma->mii_id1, ma->mii_id2) == 0) + device_set_desc(dev, "3Com internal media interface"); + else + device_set_desc(dev, MII_STR_BROADCOM_3c905Cphy); return (0); } diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index e64488f..b10e57a 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -60,7 +60,7 @@ #if !defined(lint) static const char rcsid[] = - "$FreeBSD$"; + "$Id: mii.c,v 1.1 1999/08/21 17:40:41 wpaul Exp $"; #endif static int miibus_readreg __P((device_t, int, int)); @@ -106,7 +106,7 @@ int miibus_probe(dev) { struct mii_attach_args ma, *args; struct mii_data *mii; - device_t child = 0, parent; + device_t child = NULL, parent; int bmsr, capmask = 0xFFFFFFFF; mii = device_get_softc(dev); @@ -222,6 +222,9 @@ static void miibus_mediainit(dev) struct ifmedia_entry *m; int media = 0; + /* Poke the parent in case it has any media of its own to add. */ + MIIBUS_MEDIAINIT(device_get_parent(dev)); + mii = device_get_softc(dev); for (m = LIST_FIRST(&mii->mii_media.ifm_list); m != NULL; m = LIST_NEXT(m, ifm_list)) { diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs index ed86e43..22a912c 100644 --- a/sys/dev/mii/miidevs +++ b/sys/dev/mii/miidevs @@ -1,4 +1,4 @@ -$FreeBSD$ +$Id: miidevs,v 1.1 1999/08/21 17:40:43 wpaul Exp $ /*$NetBSD: miidevs,v 1.6 1999/05/14 11:37:30 drochner Exp $*/ /*- @@ -50,6 +50,7 @@ $FreeBSD$ */ oui AMD 0x00001a Advanced Micro Devices +oui BROADCOM 0x001018 Broadcom Corporation oui DAVICOM 0x00606e Davicom Semiconductor oui ICS 0x00a0be Integrated Circuit Systems oui INTEL 0x00aa00 Intel @@ -87,6 +88,9 @@ oui xxDAVICOM 0x006040 Davicom Semiconductor model xxAMD 79C873 0x0000 Am79C873 10/100 media interface model AMD 79c973phy 0x0036 Am79c973 internal PHY +/* Broadcom Corp. PHYs. */ +model BROADCOM 3c905Cphy 0x0017 3c905C 10/100 internal PHY + /* Davicom Semiconductor PHYs */ model xxDAVICOM DM9101 0x0000 DM9101 10/100 media interface |