The ASIC on the 3c905C appears to be manufactured by Broadcom (previous

ones were made by Lucent). The Broadcom chip also appears to use an
internal PHY made by Broadcom which uses the Broadcom OUI. This is different
from previous ASICs which always returned 0 in the PHY ID registers.
To account for this, I added the necessary ID values for the Broadcom
PHY so that it can be detected and attached using the 3Com PHY driver
instead of defaulting to the generic one.
This commit is contained in:
Bill Paul 1999-08-29 15:42:04 +00:00
parent a165a91d78
commit 24a7e3d3de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50577
3 changed files with 19 additions and 7 deletions

View file

@ -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);
}

View file

@ -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)) {

View file

@ -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