Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/mii Pull up the following revisions, requested by...
details: https://anonhg.NetBSD.org/src/rev/285807b9defb
branches: netbsd-8
changeset: 930832:285807b9defb
user: martin <martin%NetBSD.org@localhost>
date: Tue Apr 14 17:57:17 2020 +0000
description:
Pull up the following revisions, requested by msaitoh in ticket #1529:
sys/dev/mii/miidevs 1.154, 1.162-1.167
sys/dev/mii/atphy.c 1.28 via patch
sys/dev/mii/brgphy.c 1.87 via patch
sys/dev/mii/etphy.c 1.5, 1.6 via patch
sys/dev/mii/rdcphy.c 1.6, 1.8 via patch
- Add support Broadcom BCM54213PE and some new RDC devices.
- Rename RDC to xxRDC.
- Use xxVIA instead of VIA.
- etphy(4):
- Rename ET1011 to ET1011C and add ET1011 support.
- Use mii_phy_flowstatus() to reflect flow status from negotiated
result.
- Use static.
- KNF.
diffstat:
sys/dev/mii/atphy.c | 6 ++----
sys/dev/mii/brgphy.c | 7 +++++--
sys/dev/mii/etphy.c | 42 ++++++++++++++++++++++++------------------
sys/dev/mii/miidevs | 30 +++++++++++++++++-------------
sys/dev/mii/rdcphy.c | 12 ++++++++----
5 files changed, 56 insertions(+), 41 deletions(-)
diffs (truncated from 344 to 300 lines):
diff -r bbe098153412 -r 285807b9defb sys/dev/mii/atphy.c
--- a/sys/dev/mii/atphy.c Tue Apr 14 17:39:28 2020 +0000
+++ b/sys/dev/mii/atphy.c Tue Apr 14 17:57:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atphy.c,v 1.18.8.1 2019/11/21 14:06:16 martin Exp $ */
+/* $NetBSD: atphy.c,v 1.18.8.2 2020/04/14 17:57:17 martin Exp $ */
/* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */
/*-
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.18.8.1 2019/11/21 14:06:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.18.8.2 2020/04/14 17:57:17 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,8 +91,6 @@
};
static const struct mii_phydesc atphys[] = {
- { MII_OUI_ATHEROS, MII_MODEL_ATHEROS_F1,
- MII_STR_ATHEROS_F1 },
{ MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L1,
MII_STR_ATTANSIC_L1 },
{ MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L2,
diff -r bbe098153412 -r 285807b9defb sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c Tue Apr 14 17:39:28 2020 +0000
+++ b/sys/dev/mii/brgphy.c Tue Apr 14 17:57:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphy.c,v 1.76.20.2 2019/05/13 12:40:13 martin Exp $ */
+/* $NetBSD: brgphy.c,v 1.76.20.3 2020/04/14 17:57:17 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.76.20.2 2019/05/13 12:40:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.76.20.3 2020/04/14 17:57:17 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -246,6 +246,9 @@
{ MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM57780,
MII_STR_BROADCOM3_BCM57780 },
+ { MII_OUI_BROADCOM4, MII_MODEL_BROADCOM4_BCM54213PE,
+ MII_STR_BROADCOM4_BCM54213PE },
+
{ MII_OUI_BROADCOM4, MII_MODEL_BROADCOM4_BCM5725C,
MII_STR_BROADCOM4_BCM5725C },
diff -r bbe098153412 -r 285807b9defb sys/dev/mii/etphy.c
--- a/sys/dev/mii/etphy.c Tue Apr 14 17:39:28 2020 +0000
+++ b/sys/dev/mii/etphy.c Tue Apr 14 17:57:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: etphy.c,v 1.1 2010/11/13 00:47:24 jnemeth Exp $ */
+/* $NetBSD: etphy.c,v 1.1.54.1 2020/04/14 17:57:17 martin Exp $ */
/* $OpenBSD: etphy.c,v 1.4 2008/04/02 20:12:58 brad Exp $ */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.1 2010/11/13 00:47:24 jnemeth Exp $");
+__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.1.54.1 2020/04/14 17:57:17 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,19 +77,21 @@
#define ETPHY_SR_FDX 0x0080
-int etphy_service(struct mii_softc *, struct mii_data *, int);
-void etphy_attach(device_t, device_t, void *);
-int etphy_match(device_t, cfdata_t, void *);
-void etphy_reset(struct mii_softc *);
-void etphy_status(struct mii_softc *);
+static int etphy_service(struct mii_softc *, struct mii_data *, int);
+static void etphy_attach(device_t, device_t, void *);
+static int etphy_match(device_t, cfdata_t, void *);
+static void etphy_reset(struct mii_softc *);
+static void etphy_status(struct mii_softc *);
-const struct mii_phy_funcs etphy_funcs = {
+static const struct mii_phy_funcs etphy_funcs = {
etphy_service, etphy_status, etphy_reset,
};
static const struct mii_phydesc etphys[] = {
{ MII_OUI_AGERE, MII_MODEL_AGERE_ET1011,
MII_STR_AGERE_ET1011 },
+ { MII_OUI_AGERE, MII_MODEL_AGERE_ET1011C,
+ MII_STR_AGERE_ET1011C },
{ 0, 0,
NULL },
};
@@ -135,7 +137,7 @@
{ 0x8010, 46 } /* IdlguardTime */
};
-int
+static int
etphy_match(device_t parent, cfdata_t match, void *aux)
{
struct mii_attach_args *ma = aux;
@@ -146,7 +148,7 @@
return 0;
}
-void
+static void
etphy_attach(device_t parent, device_t self, void *aux)
{
struct mii_softc *sc = device_private(self);
@@ -186,7 +188,7 @@
aprint_error_dev(self, "couldn't establish power handler\n");
}
-int
+static int
etphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
{
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
@@ -232,7 +234,7 @@
if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) {
PHY_WRITE(sc, MII_BMCR,
- bmcr | BMCR_AUTOEN | BMCR_STARTNEG);
+ bmcr | BMCR_AUTOEN | BMCR_STARTNEG);
}
}
break;
@@ -257,18 +259,22 @@
return 0;
}
-void
+static void
etphy_reset(struct mii_softc *sc)
{
int i;
+ if (sc->mii_mpd_model == MII_MODEL_AGERE_ET1011) {
+ mii_phy_reset(sc);
+ return;
+ }
+
for (i = 0; i < 2; ++i) {
PHY_READ(sc, MII_PHYIDR1);
PHY_READ(sc, MII_PHYIDR2);
PHY_READ(sc, ETPHY_CTRL);
- PHY_WRITE(sc, ETPHY_CTRL,
- ETPHY_CTRL_DIAG | ETPHY_CTRL_RSV1);
+ PHY_WRITE(sc, ETPHY_CTRL, ETPHY_CTRL_DIAG | ETPHY_CTRL_RSV1);
PHY_WRITE(sc, ETPHY_INDEX, ETPHY_INDEX_MAGIC);
PHY_READ(sc, ETPHY_DATA);
@@ -298,13 +304,13 @@
PHY_READ(sc, MII_BMCR);
PHY_READ(sc, ETPHY_CTRL);
- PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_S1000);
+ PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_S1000);
PHY_WRITE(sc, ETPHY_CTRL, ETPHY_CTRL_RSV1);
mii_phy_reset(sc);
}
-void
+static void
etphy_status(struct mii_softc *sc)
{
struct mii_data *mii = sc->mii_pdata;
@@ -343,7 +349,7 @@
}
if (sr & ETPHY_SR_FDX)
- mii->mii_media_active |= IFM_FDX;
+ mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc);
else
mii->mii_media_active |= IFM_HDX;
}
diff -r bbe098153412 -r 285807b9defb sys/dev/mii/miidevs
--- a/sys/dev/mii/miidevs Tue Apr 14 17:39:28 2020 +0000
+++ b/sys/dev/mii/miidevs Tue Apr 14 17:57:17 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.125.6.8 2019/11/25 15:57:23 martin Exp $
+$NetBSD: miidevs,v 1.125.6.9 2020/04/14 17:57:17 martin Exp $
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -53,10 +53,12 @@
oui TRIDIUM 0x0001f0 Tridium
oui DATATRACK 0x0002c6 Data Track Technology
oui AGERE 0x00053d Agere
+oui QUAKE 0x000897 Quake Technologies
oui BANKSPEED 0x0006b8 Bankspeed Pty
oui NETEXCELL 0x0008bb NetExcell
oui NETAS 0x0009c3 Netas
oui BROADCOM2 0x000af7 Broadcom Corporation
+oui AELUROS 0x000b25 Aeluros
oui RALINK 0x000c43 Ralink Technology
oui ASIX 0x000ec6 ASIX
oui BROADCOM 0x001018 Broadcom Corporation
@@ -64,13 +66,11 @@
oui ALTIMA 0x0010a9 Altima Communications
oui ENABLESEMI 0x0010dd Enable Semiconductor
oui SUNPLUS 0x001105 Sunplus Technology
-oui ATHEROS 0x001374 Atheros
oui TERANETICS 0x0014a6 Teranetics
oui RALINK2 0x0017a5 Ralink Technology
oui AQUANTIA 0x0017b6 Aquantia Corporation
oui BROADCOM3 0x001be9 Broadcom Corporation
oui LEVEL1 0x00207b Level 1
-oui VIA 0x004063 VIA Technologies
oui MARVELL 0x005043 Marvell Semiconductor
oui QUALSEMI 0x006051 Quality Semiconductor
oui AMLOGIC 0x006051 Amlogic
@@ -82,7 +82,6 @@
oui TSC 0x00c039 TDK Semiconductor
oui MYSON 0x00c0b4 Myson Technology
oui ATTANSIC 0x00c82e Attansic Technology
-oui RDC 0x00d02d RDC Semiconductor
oui JMICRON 0x00d831 JMicron
oui PMCSIERRA 0x00e004 PMC-Sierra
oui SIS 0x00e006 Silicon Integrated Systems
@@ -97,6 +96,7 @@
/* Unregistered or wrong OUI */
oui yyREALTEK 0x000004 Realtek
oui yyAMD 0x000058 Advanced Micro Devices
+oui xxVIA 0x0002c6 VIA Technologies
oui xxMYSON 0x00032d Myson Technology
oui xxTSC 0x00039c TDK Semiconductor
oui xxASIX 0x000674 Asix Semiconductor
@@ -115,6 +115,7 @@
oui xxVITESSE 0x008083 Vitesse Semiconductor
oui xxPMCSIERRA2 0x009057 PMC-Sierra
oui xxCICADA 0x00c08f Cicada Semiconductor
+oui xxRDC 0x00d02d RDC Semiconductor
oui xxNATSEMI 0x1000e8 National Semiconductor
oui xxLEVEL1 0x782000 Level 1
oui xxXAQTI 0xace000 XaQti Corp.
@@ -126,7 +127,8 @@
/*
* Agere PHYs
*/
-model AGERE ET1011 0x0004 Agere ET1011 10/100/1000baseT PHY
+model AGERE ET1011 0x0001 ET1011 10/100/1000baseT PHY
+model AGERE ET1011C 0x0004 ET1011C 10/100/1000baseT PHY
/* Asix semiconductor PHYs */
model xxASIX AX88X9X 0x0031 Ax88x9x internal PHY
@@ -147,11 +149,7 @@
model AMLOGIC GXL 0x0000 Meson GXL internal PHY
model xxAMLOGIC GXL 0x0000 Meson GXL internal PHY
-/* Atheros PHYs */
-model ATHEROS F1 0x0001 F1 10/100/1000 PHY
-model ATHEROS F2 0x0002 F2 10/100 PHY
-
-/* Attansic PHYs */
+/* Attansic/Atheros PHYs */
model ATTANSIC L1 0x0001 L1 10/100/1000 PHY
model ATTANSIC L2 0x0002 L2 10/100 PHY
model ATTANSIC AR8021 0x0004 Atheros AR8021 10/100/1000 PHY
@@ -218,6 +216,7 @@
model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface
model BROADCOM3 BCM53125 0x0032 BCM53125 1000BASE-T switch
model BROADCOM3 BCM5720C 0x0036 BCM5720C 1000BASE-T media interface
+model BROADCOM4 BCM54213PE 0x000a BCM54213PE 1000BASE-T media interface
model BROADCOM4 BCM5725C 0x0038 BCM5725C 1000BASE-T media interface
model xxBROADCOM_ALT1 BCM5906 0x0004 BCM5906 10/100baseTX media interface
@@ -353,7 +352,9 @@
model xxQUALSEMI QS6612 0x0000 QS6612 10/100 media interface
/* RDC Semiconductor PHYs */
-model RDC R6040 0x0003 R6040 10/100 media interface
+model xxRDC R6040 0x0003 R6040 10/100 media interface
+model xxRDC R6040_2 0x0005 R6040 10/100 media interface
+model xxRDC R6040_3 0x0006 R6040 10/100 media interface
/* RealTek PHYs */
model xxREALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface
@@ -380,6 +381,9 @@
model SMSC LAN8741A 0x0012 SMSC LAN8741A 10/100 media interface
model SMSC LAN8742 0x0013 SMSC LAN8742 10/100 media interface
+/* Teranetics PHY */
+model TERANETICS TN1010 0x0001 Teranetics TN1010 10GBase-T PHY
+
/* Texas Instruments PHYs */
model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface
model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface
Home |
Main Index |
Thread Index |
Old Index