summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchs <chs@NetBSD.org>2006-03-14 04:48:44 +0000
committerchs <chs@NetBSD.org>2006-03-14 04:48:44 +0000
commitbf841929a2a2002238524d9dd0c3a50eb8ac29ae (patch)
tree1341f692813f74e4bd5ac8722a81e1f5f028063c /sys/dev
parenta5025b9e3c7f1aa47447de71e1d7cfb88e955dbf (diff)
add an rlphy clone from IC Plus. from openbsd.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mii/miidevs6
-rw-r--r--sys/dev/mii/rlphy.c21
2 files changed, 19 insertions, 8 deletions
diff --git a/sys/dev/mii/miidevs b/sys/dev/mii/miidevs
index b7052487716..71f24ae8511 100644
--- a/sys/dev/mii/miidevs
+++ b/sys/dev/mii/miidevs
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.63 2006/02/18 14:17:16 thorpej Exp $
+$NetBSD: miidevs,v 1.64 2006/03/14 04:48:44 chs Exp $
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -58,6 +58,7 @@ oui BROADCOM 0x001018 Broadcom Corporation
oui CICADA 0x0003F1 Cicada Semiconductor
oui DAVICOM 0x00606e Davicom Semiconductor
oui ENABLESEMI 0x0010dd Enable Semiconductor
+oui ICPLUS 0x0090c3 IC Plus Corp.
oui ICS 0x00a0be Integrated Circuit Systems
oui INTEL 0x00aa00 Intel
oui LEVEL1 0x00207b Level 1
@@ -150,6 +151,9 @@ model xxCICADA CS8201B 0x0021 Cicada CS8201 10/100/1000TX PHY
model xxDAVICOM DM9101 0x0000 DM9101 (AMD Am79C873) 10/100 media interface
model xxDAVICOM DM9102 0x0004 DM9102 10/100 media interface
+/* IC Plus Corp. PHYs */
+model ICPLUS IP101 0x0005 IP101 10/100 PHY
+
/* Integrated Circuit Systems PHYs */
model ICS 1889 0x0001 ICS1889 10/100 media interface
model ICS 1890 0x0002 ICS1890 10/100 media interface
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index 01354579a43..eb7d8e2113f 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rlphy.c,v 1.6 2006/03/12 22:30:24 chs Exp $ */
+/* $NetBSD: rlphy.c,v 1.7 2006/03/14 04:48:44 chs Exp $ */
/* $OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $ */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.6 2006/03/12 22:30:24 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.7 2006/03/14 04:48:44 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,16 +69,23 @@ const struct mii_phy_funcs rlphy_funcs = {
rlphy_service, rlphy_status, mii_phy_reset,
};
+static const struct mii_phydesc rlphys[] = {
+ { MII_OUI_yyREALTEK, MII_MODEL_yyREALTEK_RTL8201L,
+ MII_STR_yyREALTEK_RTL8201L },
+ { MII_OUI_ICPLUS, MII_MODEL_ICPLUS_IP101,
+ MII_STR_ICPLUS_IP101 },
+
+ { 0, 0,
+ NULL },
+};
+
int
rlphymatch(struct device *parent, struct cfdata *match, void *aux)
{
struct mii_attach_args *ma = aux;
- /* Test for RealTek 8201L PHY */
- if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_yyREALTEK &&
- MII_MODEL(ma->mii_id2) == MII_MODEL_yyREALTEK_RTL8201L) {
- return 10;
- }
+ if (mii_phy_match(ma, rlphys) != NULL)
+ return (10);
if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 ||
MII_MODEL(ma->mii_id2) != 0)