Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/mii Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/9e14eb211582
branches:  netbsd-9
changeset: 1001044:9e14eb211582
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Oct 23 19:45:56 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #372):

        sys/dev/mii/miidevs: revision 1.158
        sys/dev/mii/ciphy.c: revision 1.37

- All of Cicada and Vitesse devices' OUI are not bit-reversed, so use "xx".
- Rename CS82xx -> CIS82xx
- Add Vitesse VSC8224, VSC8234, VSC8641 and VSC8501.
- 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 ++++++++++++++++++++++-------------------
 sys/dev/mii/miidevs |  29 ++++++++++++++++-------------
 2 files changed, 38 insertions(+), 32 deletions(-)

diffs (150 lines):

diff -r 2559b5fc6eab -r 9e14eb211582 sys/dev/mii/ciphy.c
--- a/sys/dev/mii/ciphy.c       Wed Oct 23 19:43:24 2019 +0000
+++ b/sys/dev/mii/ciphy.c       Wed Oct 23 19:45:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.34.4.1 2019/10/17 19:06:58 martin Exp $ */
+/* $NetBSD: ciphy.c,v 1.34.4.2 2019/10/23 19:45:56 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34.4.1 2019/10/17 19:06:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34.4.2 2019/10/23 19:45:56 martin 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",
diff -r 2559b5fc6eab -r 9e14eb211582 sys/dev/mii/miidevs
--- a/sys/dev/mii/miidevs       Wed Oct 23 19:43:24 2019 +0000
+++ b/sys/dev/mii/miidevs       Wed Oct 23 19:45:56 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.153.2.1 2019/09/01 13:56:01 martin Exp $
+$NetBSD: miidevs,v 1.153.2.2 2019/10/23 19:45:56 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -50,10 +50,8 @@
  */
 
 oui AMD                                0x00001a        Advanced Micro Devices
-oui VITESSE                    0x0001c1        Vitesse
 oui TRIDIUM                    0x0001f0        Tridium
 oui DATATRACK                  0x0002c6        Data Track Technology
-oui CICADA                     0x0003f1        Cicada Semiconductor
 oui AGERE                      0x00053d        Agere
 oui BANKSPEED                  0x0006b8        Bankspeed Pty
 oui NETEXCELL                  0x0008bb        NetExcell
@@ -111,6 +109,7 @@
 oui xxBROADCOM_ALT1            0x0050ef        Broadcom Corporation
 oui yyINTEL                    0x005500        Intel
 oui yyASIX                     0x007063        Asix Semiconductor
+oui xxVITESSE                  0x008083        Vitesse Semiconductor
 oui xxPMCSIERRA2               0x009057        PMC-Sierra
 oui xxCICADA                   0x00c08f        Cicada Semiconductor
 oui xxNATSEMI                  0x1000e8        National Semiconductor
@@ -220,15 +219,17 @@
 model BROADCOM4 BCM5725C       0x0038 BCM5725C 1000BASE-T media interface
 model xxBROADCOM_ALT1 BCM5906  0x0004 BCM5906 10/100baseTX media interface
 
-/* Cicada Semiconductor PHYs (now owned by Vitesse?) */
-model CICADA CS8201            0x0001 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8204            0x0004 Cicada CS8204 10/100/1000TX PHY
-model CICADA VSC8211           0x000b Cicada VSC8211 10/100/1000TX PHY
-model CICADA CS8201A           0x0020 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8201B           0x0021 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8244            0x002c Vitesse VSC8244 Quad 10/100/1000BASE-T PHY
+/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */
+
+model xxCICADA CIS8201         0x0001 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA CIS8204         0x0004 Cicada CIS8204 10/100/1000TX PHY
+model xxCICADA VSC8211         0x000b Cicada VSC8211 10/100/1000TX PHY
 model xxCICADA VSC8221         0x0015 Vitesse VSC8221 10/100/1000BASE-T PHY
-model xxCICADA CS8201B         0x0021 Cicada CS8201 10/100/1000TX PHY
+model xxCICADA VSC8224         0x0018 Vitesse VSC8224 10/100/1000BASE-T PHY
+model xxCICADA CIS8201A                0x0020 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA CIS8201B                0x0021 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA VSC8234         0x0022 Vitesse VSC8234 10/100/1000TX PHY
+model xxCICADA VSC8244         0x002c Vitesse VSC8244 Quad 10/100/1000BASE-T PHY
 
 /* Davicom Semiconductor PHYs */
 /* AMD Am79C873 seems to be a relabeled DM9101 */
@@ -390,8 +391,10 @@
 model VIA VT6103               0x0032  VT6103 10/100 PHY
 model VIA VT6103_2             0x0034  VT6103 10/100 PHY
 
-/* Vitesse PHYs */
-model VITESSE VSC8601          0x0002  VSC8601 10/100/1000 PHY
+/* Vitesse PHYs (Now Microsemi) */
+model xxVITESSE VSC8601                0x0002 VSC8601 10/100/1000 PHY
+model xxVITESSE VSC8641                0x0003 Vitesse VSC8641 10/100/1000TX PHY
+model xxVITESSE VSC8501                0x0013 Vitesse VSC8501 10/100/1000TX PHY
 
 /* XaQti Corp. PHYs */
 model xxXAQTI XMACII           0x0000 XaQti Corp. XMAC II gigabit interface



Home | Main Index | Thread Index | Old Index