summaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>2004-08-06 09:57:17 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>2004-08-06 09:57:17 +0000
commitb686a1eb3d6d5ab480faada4dfc44d6451b3f0fd (patch)
tree53bc9ac34f656a53ddfeb84e99b586a8e3f416d0 /sys/dev/mii
parent31cfdd14a56219b0be1e05e49c079a3322a9d252 (diff)
Add support for Am79C875 quad phy.
ok deraadt@
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/amphy.c15
-rw-r--r--sys/dev/mii/miidevs3
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/mii/amphy.c b/sys/dev/mii/amphy.c
index 00e4dea2c6b..daa34732d00 100644
--- a/sys/dev/mii/amphy.c
+++ b/sys/dev/mii/amphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amphy.c,v 1.4 2002/04/17 19:30:26 jason Exp $ */
+/* $OpenBSD: amphy.c,v 1.5 2004/08/06 09:57:16 pefo Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -87,6 +87,9 @@ amphymatch(parent, match, aux)
if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_DAVICOM &&
MII_MODEL(ma->mii_id2) == MII_MODEL_DAVICOM_DM9102)
return(10);
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxALTIMA && /*XXX*/
+ MII_MODEL(ma->mii_id2) == MII_MODEL_AMD_79C875phy)
+ return(10);
return(0);
}
@@ -100,8 +103,14 @@ amphyattach(parent, self, aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
- printf(": %s, rev. %d\n", MII_STR_xxAMD_79C873,
- MII_REV(ma->mii_id2));
+ if ((MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxALTIMA && /*XXX*/
+ MII_MODEL(ma->mii_id2) == MII_MODEL_AMD_79C875phy)) {
+ printf(": %s, rev. %d\n", MII_STR_AMD_79C875phy,
+ MII_REV(ma->mii_id2));
+ } else {
+ printf(": %s, rev. %d\n", MII_STR_xxAMD_79C873,
+ MII_REV(ma->mii_id2));
+ }
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs
index 3f5b071dffa..53af5e86ea2 100644
--- a/sys/dev/mii/miidevs
+++ b/sys/dev/mii/miidevs
@@ -1,4 +1,4 @@
-$OpenBSD: miidevs,v 1.41 2004/06/05 05:42:08 pvalchev Exp $
+$OpenBSD: miidevs,v 1.42 2004/08/06 09:57:16 pefo Exp $
/* $NetBSD: miidevs,v 1.3 1998/11/05 03:43:43 thorpej Exp $ */
/*-
@@ -101,6 +101,7 @@ oui xxMARVELL 0x000ac2 Marvell Semiconductor
/* Advanced Micro Devices PHYs */
model xxAMD 79C873 0x0000 Am79C873 10/100 media interface
model AMD 79C873phy 0x0036 Am79C873 internal PHY
+model AMD 79C875phy 0x0014 Am79C875 quad PHY
/* Altima Communications PHYs */
model xxALTIMA AC101 0x0021 AC101 10/100 media interface