summaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-03 15:54:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-03 15:54:45 +0000
commitdd9562820f9e4b9a14d1dc35f4829a0c76b4aa71 (patch)
treead095a0a0fb41430d547465cbcf2a6777e96a5e4 /sys/dev/mii
parent0e975035192e999845c34817e207337d8920175f (diff)
ICS_1892 support; Henning Brauer
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/icsphy.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/sys/dev/mii/icsphy.c b/sys/dev/mii/icsphy.c
index d98a42cf58c..7c153e36e50 100644
--- a/sys/dev/mii/icsphy.c
+++ b/sys/dev/mii/icsphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icsphy.c,v 1.6 2000/08/26 20:04:17 nate Exp $ */
+/* $OpenBSD: icsphy.c,v 1.7 2001/06/03 15:54:44 deraadt Exp $ */
/* $NetBSD: icsphy.c,v 1.17 2000/02/02 23:34:56 thorpej Exp $ */
/*-
@@ -69,6 +69,7 @@
/*
* driver for Integrated Circuit Systems' ICS1890 ethernet 10/100 PHY
+ * and its successor ICS1892
* datasheet from www.icst.com
*/
@@ -115,6 +116,10 @@ icsphymatch(parent, match, aux)
if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxICS &&
MII_MODEL(ma->mii_id2) == MII_MODEL_xxICS_1890)
return (10);
+
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxICS &&
+ MII_MODEL(ma->mii_id2) == MII_MODEL_xxICS_1892)
+ return (10);
return (0);
}
@@ -128,8 +133,15 @@ icsphyattach(parent, self, aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
- printf(": %s, rev. %d\n", MII_STR_xxICS_1890,
- MII_REV(ma->mii_id2));
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxICS &&
+ MII_MODEL(ma->mii_id2) == MII_MODEL_xxICS_1890)
+ printf(": %s, rev. %d\n", MII_STR_xxICS_1890,
+ MII_REV(ma->mii_id2));
+
+ if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxICS &&
+ MII_MODEL(ma->mii_id2) == MII_MODEL_xxICS_1892)
+ printf(": %s, rev. %d\n", MII_STR_xxICS_1892,
+ MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@@ -266,4 +278,11 @@ icsphy_reset(sc)
mii_phy_reset(sc);
PHY_WRITE(sc, MII_ICSPHY_ECR2, ECR2_10TPROT|ECR2_Q10T);
+
+ /*
+ * XXX the ICS1892 doesn't set the BMCR properly after
+ * XXX reset, which breaks autonegotiation.
+ */
+ PHY_WRITE(sc, MII_BMCR, BMCR_S100|BMCR_AUTOEN|BMCR_FDX);
+
}