summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-01 21:40:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-01 21:40:49 +0000
commit180d87df4f5fe0e299a15cfdda50bdf9bfa5029f (patch)
treece7c55b8f6e948a1a06ea6a68bffaf962892e97c /sys/dev
parent9d801294cf1281b5c7bfd0e04a66112e87240a2b (diff)
support BCM5221
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mii/bmtphy.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/mii/bmtphy.c b/sys/dev/mii/bmtphy.c
index 7a3a86a77bf..e92597c00db 100644
--- a/sys/dev/mii/bmtphy.c
+++ b/sys/dev/mii/bmtphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bmtphy.c,v 1.1 2001/04/11 06:47:31 deraadt Exp $ */
+/* $OpenBSD: bmtphy.c,v 1.2 2001/06/01 21:40:48 deraadt Exp $ */
/* $NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $ */
/*
@@ -50,6 +50,9 @@ bmtphymatch(parent, match, aux)
if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_BROADCOM &&
MII_MODEL(ma->mii_id2) == MII_MODEL_BROADCOM_BCM5201)
return (10);
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_BROADCOM &&
+ MII_MODEL(ma->mii_id2) == MII_MODEL_BROADCOM_BCM5221)
+ return (10);
return (0);
}
@@ -63,9 +66,14 @@ bmtphyattach(parent, self, aux)
struct mii_softc *sc = (struct mii_softc *)self;
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
+ char *model;
+
+ if (MII_MODEL(ma->mii_id2) == MII_MODEL_BROADCOM_BCM5201)
+ model = MII_STR_BROADCOM_BCM5201;
+ else if (MII_MODEL(ma->mii_id2) == MII_MODEL_BROADCOM_BCM5221)
+ model = MII_STR_BROADCOM_BCM5221;
- printf(": %s, rev. %d\n", MII_STR_BROADCOM_BCM5201,
- MII_REV(ma->mii_id2));
+ printf(": %s, rev. %d\n", model, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;