Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/mii - Match a lot of Cicada and Vitesse devices corr...



details:   https://anonhg.NetBSD.org/src/rev/e01d4cfbc9c4
branches:  trunk
changeset: 966182:e01d4cfbc9c4
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Oct 17 09:22:49 2019 +0000

description:
- Match a lot of Cicada and Vitesse devices correctly. This change also fixes
  a bug that ciphy_fixup() didn't work.
- Match VSC8221, VSC8234 and VSC8641.

diffstat:

 sys/dev/mii/ciphy.c |  41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diffs (83 lines):

diff -r 41fe8eabf979 -r e01d4cfbc9c4 sys/dev/mii/ciphy.c
--- a/sys/dev/mii/ciphy.c       Thu Oct 17 09:22:00 2019 +0000
+++ b/sys/dev/mii/ciphy.c       Thu Oct 17 09:22:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -74,16 +74,16 @@
 };
 
 static const struct mii_phydesc ciphys[] = {
-       MII_PHY_DESC(CICADA, CS8201),
-       MII_PHY_DESC(CICADA, CS8201A),
-       MII_PHY_DESC(CICADA, CS8201B),
-       MII_PHY_DESC(CICADA, CS8204),
-       MII_PHY_DESC(CICADA, VSC8211),
-       MII_PHY_DESC(CICADA, CS8244),
-       MII_PHY_DESC(CICADA, CS8201),
-       MII_PHY_DESC(CICADA, CS8201A),
-       MII_PHY_DESC(xxCICADA, CS8201B),
-       MII_PHY_DESC(VITESSE, VSC8601),
+       MII_PHY_DESC(xxCICADA, CIS8201),
+       MII_PHY_DESC(xxCICADA, CIS8201A),
+       MII_PHY_DESC(xxCICADA, CIS8201B),
+       MII_PHY_DESC(xxCICADA, CIS8204),
+       MII_PHY_DESC(xxCICADA, VSC8211),
+       MII_PHY_DESC(xxCICADA, VSC8221),
+       MII_PHY_DESC(xxCICADA, VSC8234),
+       MII_PHY_DESC(xxCICADA, VSC8244),
+       MII_PHY_DESC(xxVITESSE, VSC8601),
+       MII_PHY_DESC(xxVITESSE, VSC8641),
        MII_PHY_END,
 };
 
@@ -398,8 +398,8 @@
        }
 
        switch (model) {
-       case MII_MODEL_CICADA_CS8201:
-       case MII_MODEL_CICADA_CS8204:
+       case MII_MODEL_xxCICADA_CIS8201:
+       case MII_MODEL_xxCICADA_CIS8204:
                /* Turn off "aux mode" (whatever that means) */
                PHY_SETBIT(sc, CIPHY_MII_AUXCSR, CIPHY_AUXCSR_MDPPS);
 
@@ -418,8 +418,8 @@
 
                break;
 
-       case MII_MODEL_CICADA_CS8201A:
-       case MII_MODEL_CICADA_CS8201B:
+       case MII_MODEL_xxCICADA_CIS8201A:
+       case MII_MODEL_xxCICADA_CIS8201B:
                /*
                 * Work around speed polling bug in VT3119/VT3216
                 * when using MII in full duplex mode.
@@ -431,9 +431,12 @@
                        PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
 
                break;
-       case MII_MODEL_CICADA_VSC8211:
-       case MII_MODEL_CICADA_CS8244:
-       case MII_MODEL_VITESSE_VSC8601:
+       case MII_MODEL_xxCICADA_VSC8211:
+       case MII_MODEL_xxCICADA_VSC8221:
+       case MII_MODEL_xxCICADA_VSC8234:
+       case MII_MODEL_xxCICADA_VSC8244:
+       case MII_MODEL_xxVITESSE_VSC8601:
+       case MII_MODEL_xxVITESSE_VSC8641:
                break;
        default:
                aprint_error_dev(sc->mii_dev, "unknown CICADA PHY model %x\n",



Home | Main Index | Thread Index | Old Index