summaryrefslogtreecommitdiff
path: root/sys/dev/mii/rlphy.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2004-09-23 15:33:00 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2004-09-23 15:33:00 +0000
commit266f8243aaeefdb9fd63aaad2301ddddf85bf32c (patch)
treeadb18f417b64c73be241cf82e88cb3b44842f2f5 /sys/dev/mii/rlphy.c
parent6c7feac462383f750f6e96a3e1fc86da535e3051 (diff)
RTL8201L PHY support; from FreeBSD.
Diffstat (limited to 'sys/dev/mii/rlphy.c')
-rw-r--r--sys/dev/mii/rlphy.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index 0228efe461c..f21ca0f5e4a 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlphy.c,v 1.9 2004/09/20 06:05:27 brad Exp $ */
+/* $OpenBSD: rlphy.c,v 1.10 2004/09/23 15:32:59 fgsch Exp $ */
/*
* Copyright (c) 1998, 1999 Jason L. Wright (jason@thought.net)
@@ -69,6 +69,12 @@ rlphymatch(parent, match, aux)
{
struct mii_attach_args *ma = aux;
+ /* Test for RealTek 8201L PHY */
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_REALTEK &&
+ MII_MODEL(ma->mii_id2) == MII_MODEL_REALTEK_RTL8201L) {
+ return(10);
+ }
+
if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 ||
MII_MODEL(ma->mii_id2) != 0)
return (0);
@@ -92,7 +98,11 @@ rlphyattach(parent, self, aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
- printf(": RTL internal phy\n");
+ if (MII_MODEL(ma->mii_id2) == MII_MODEL_REALTEK_RTL8201L) {
+ printf(": %s, rev. %d\n", MII_STR_REALTEK_RTL8201L,
+ MII_REV(ma->mii_id2));
+ } else
+ printf(": RTL internal phy\n");
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;