Tue Apr 14 16:43:12 2020 UTC ()
Pull up following revision(s) (requested by msaitoh in ticket #831):

	sys/dev/mii/rdcphy.c: revision 1.6
	sys/dev/mii/rdcphy.c: revision 1.8
	sys/dev/mii/miidevs: revision 1.162
	sys/dev/mii/miidevs: revision 1.163
	sys/dev/mii/miidevs: revision 1.164
	sys/dev/mii/miidevs: revision 1.165
	sys/dev/mii/miidevs: revision 1.167
	sys/dev/mii/brgphy.c: revision 1.87

  Change the OUI macro name of RDC to xxRDC. 0x00d02d is non-bitreverse value
of official 0x000bb4. From Andrius V.
RDC -> xxRDC. No functional change.

Add BCM54213PE

Match BCM54213PE

  Use xxVIA instead of VIA.
0x004063 is VIA's official OUI but VT6103 use 0x0002c6.
0x0002c6 is non-bitreversed value of 0x004063. Reported by Andrius V.

- Add Quake Technologies and Aeluros' OUI
- Add Teranetics TN1010 10GBase-T PHY
  Add two new RDC PHYs from Andrius V.
  Add two new RDC PHYs from Andrius V.


(martin)
diff -r1.84 -r1.84.4.1 src/sys/dev/mii/brgphy.c
diff -r1.153.2.5 -r1.153.2.6 src/sys/dev/mii/miidevs
diff -r1.4 -r1.4.4.1 src/sys/dev/mii/rdcphy.c

cvs diff -r1.84 -r1.84.4.1 src/sys/dev/mii/brgphy.c (expand / switch to unified diff)

--- src/sys/dev/mii/brgphy.c 2019/04/11 08:50:20 1.84
+++ src/sys/dev/mii/brgphy.c 2020/04/14 16:43:12 1.84.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $ */ 1/* $NetBSD: brgphy.c,v 1.84.4.1 2020/04/14 16:43:12 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -52,27 +52,27 @@ @@ -52,27 +52,27 @@
52 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 52 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
53 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 53 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
54 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 */ 55 */
56 56
57/* 57/*
58 * driver for the Broadcom BCM5400 and BCM5700 Gig-E PHYs. 58 * driver for the Broadcom BCM5400 and BCM5700 Gig-E PHYs.
59 * 59 *
60 * Programming information for this PHY was gleaned from FreeBSD 60 * Programming information for this PHY was gleaned from FreeBSD
61 * (they were apparently able to get a datasheet from Broadcom). 61 * (they were apparently able to get a datasheet from Broadcom).
62 */ 62 */
63 63
64#include <sys/cdefs.h> 64#include <sys/cdefs.h>
65__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $"); 65__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.84.4.1 2020/04/14 16:43:12 martin Exp $");
66 66
67#include <sys/param.h> 67#include <sys/param.h>
68#include <sys/systm.h> 68#include <sys/systm.h>
69#include <sys/kernel.h> 69#include <sys/kernel.h>
70#include <sys/device.h> 70#include <sys/device.h>
71#include <sys/socket.h> 71#include <sys/socket.h>
72#include <sys/errno.h> 72#include <sys/errno.h>
73#include <prop/proplib.h> 73#include <prop/proplib.h>
74 74
75#include <net/if.h> 75#include <net/if.h>
76#include <net/if_media.h> 76#include <net/if_media.h>
77 77
78#include <dev/mii/mii.h> 78#include <dev/mii/mii.h>
@@ -168,26 +168,27 @@ static const struct mii_phydesc brgphys[ @@ -168,26 +168,27 @@ static const struct mii_phydesc brgphys[
168 MII_PHY_DESC(BROADCOM2, BCM5709CAX), 168 MII_PHY_DESC(BROADCOM2, BCM5709CAX),
169 MII_PHY_DESC(BROADCOM2, BCM5722), 169 MII_PHY_DESC(BROADCOM2, BCM5722),
170 MII_PHY_DESC(BROADCOM2, BCM5754), 170 MII_PHY_DESC(BROADCOM2, BCM5754),
171 MII_PHY_DESC(BROADCOM2, BCM5755), 171 MII_PHY_DESC(BROADCOM2, BCM5755),
172 MII_PHY_DESC(BROADCOM2, BCM5756), 172 MII_PHY_DESC(BROADCOM2, BCM5756),
173 MII_PHY_DESC(BROADCOM2, BCM5761), 173 MII_PHY_DESC(BROADCOM2, BCM5761),
174 MII_PHY_DESC(BROADCOM2, BCM5784), 174 MII_PHY_DESC(BROADCOM2, BCM5784),
175 MII_PHY_DESC(BROADCOM2, BCM5785), 175 MII_PHY_DESC(BROADCOM2, BCM5785),
176 MII_PHY_DESC(BROADCOM3, BCM5717C), 176 MII_PHY_DESC(BROADCOM3, BCM5717C),
177 MII_PHY_DESC(BROADCOM3, BCM5719C), 177 MII_PHY_DESC(BROADCOM3, BCM5719C),
178 MII_PHY_DESC(BROADCOM3, BCM5720C), 178 MII_PHY_DESC(BROADCOM3, BCM5720C),
179 MII_PHY_DESC(BROADCOM3, BCM57765), 179 MII_PHY_DESC(BROADCOM3, BCM57765),
180 MII_PHY_DESC(BROADCOM3, BCM57780), 180 MII_PHY_DESC(BROADCOM3, BCM57780),
 181 MII_PHY_DESC(BROADCOM4, BCM54213PE),
181 MII_PHY_DESC(BROADCOM4, BCM5725C), 182 MII_PHY_DESC(BROADCOM4, BCM5725C),
182 MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), 183 MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906),
183 MII_PHY_END, 184 MII_PHY_END,
184}; 185};
185 186
186static int 187static int
187brgphymatch(device_t parent, cfdata_t match, void *aux) 188brgphymatch(device_t parent, cfdata_t match, void *aux)
188{ 189{
189 struct mii_attach_args *ma = aux; 190 struct mii_attach_args *ma = aux;
190 191
191 if (mii_phy_match(ma, brgphys) != NULL) 192 if (mii_phy_match(ma, brgphys) != NULL)
192 return 10; 193 return 10;
193 194

cvs diff -r1.153.2.5 -r1.153.2.6 src/sys/dev/mii/miidevs (expand / switch to unified diff)

--- src/sys/dev/mii/miidevs 2020/03/19 19:21:37 1.153.2.5
+++ src/sys/dev/mii/miidevs 2020/04/14 16:43:12 1.153.2.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: miidevs,v 1.153.2.5 2020/03/19 19:21:37 martin Exp $ 1$NetBSD: miidevs,v 1.153.2.6 2020/04/14 16:43:12 martin Exp $
2 2
3/*- 3/*-
4 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -43,87 +43,89 @@ $NetBSD: miidevs,v 1.153.2.5 2020/03/19  @@ -43,87 +43,89 @@ $NetBSD: miidevs,v 1.153.2.5 2020/03/19
43 * The MII_OUI() macro in "miivar.h" reflects this. 43 * The MII_OUI() macro in "miivar.h" reflects this.
44 * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here 44 * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here
45 * which is mangled accordingly to compensate. 45 * which is mangled accordingly to compensate.
46 */ 46 */
47 47
48/* 48/*
49 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h 49 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
50 */ 50 */
51 51
52oui AMD 0x00001a Advanced Micro Devices 52oui AMD 0x00001a Advanced Micro Devices
53oui TRIDIUM 0x0001f0 Tridium 53oui TRIDIUM 0x0001f0 Tridium
54oui DATATRACK 0x0002c6 Data Track Technology 54oui DATATRACK 0x0002c6 Data Track Technology
55oui AGERE 0x00053d Agere 55oui AGERE 0x00053d Agere
 56oui QUAKE 0x000897 Quake Technologies
56oui BANKSPEED 0x0006b8 Bankspeed Pty 57oui BANKSPEED 0x0006b8 Bankspeed Pty
57oui NETEXCELL 0x0008bb NetExcell 58oui NETEXCELL 0x0008bb NetExcell
58oui NETAS 0x0009c3 Netas 59oui NETAS 0x0009c3 Netas
59oui BROADCOM2 0x000af7 Broadcom Corporation 60oui BROADCOM2 0x000af7 Broadcom Corporation
 61oui AELUROS 0x000b25 Aeluros
60oui RALINK 0x000c43 Ralink Technology 62oui RALINK 0x000c43 Ralink Technology
61oui ASIX 0x000ec6 ASIX 63oui ASIX 0x000ec6 ASIX
62oui BROADCOM 0x001018 Broadcom Corporation 64oui BROADCOM 0x001018 Broadcom Corporation
63oui MICREL 0x0010a1 Micrel 65oui MICREL 0x0010a1 Micrel
64oui ALTIMA 0x0010a9 Altima Communications 66oui ALTIMA 0x0010a9 Altima Communications
65oui ENABLESEMI 0x0010dd Enable Semiconductor 67oui ENABLESEMI 0x0010dd Enable Semiconductor
66oui SUNPLUS 0x001105 Sunplus Technology 68oui SUNPLUS 0x001105 Sunplus Technology
67oui TERANETICS 0x0014a6 Teranetics 69oui TERANETICS 0x0014a6 Teranetics
68oui RALINK2 0x0017a5 Ralink Technology 70oui RALINK2 0x0017a5 Ralink Technology
69oui AQUANTIA 0x0017b6 Aquantia Corporation 71oui AQUANTIA 0x0017b6 Aquantia Corporation
70oui BROADCOM3 0x001be9 Broadcom Corporation 72oui BROADCOM3 0x001be9 Broadcom Corporation
71oui LEVEL1 0x00207b Level 1 73oui LEVEL1 0x00207b Level 1
72oui VIA 0x004063 VIA Technologies 
73oui MARVELL 0x005043 Marvell Semiconductor 74oui MARVELL 0x005043 Marvell Semiconductor
74oui QUALSEMI 0x006051 Quality Semiconductor 75oui QUALSEMI 0x006051 Quality Semiconductor
75oui AMLOGIC 0x006051 Amlogic 76oui AMLOGIC 0x006051 Amlogic
76oui DAVICOM 0x00606e Davicom Semiconductor 77oui DAVICOM 0x00606e Davicom Semiconductor
77oui SMSC 0x00800f SMSC 78oui SMSC 0x00800f SMSC
78oui SEEQ 0x00a07d Seeq 79oui SEEQ 0x00a07d Seeq
79oui ICS 0x00a0be Integrated Circuit Systems 80oui ICS 0x00a0be Integrated Circuit Systems
80oui INTEL 0x00aa00 Intel 81oui INTEL 0x00aa00 Intel
81oui TSC 0x00c039 TDK Semiconductor 82oui TSC 0x00c039 TDK Semiconductor
82oui MYSON 0x00c0b4 Myson Technology 83oui MYSON 0x00c0b4 Myson Technology
83oui ATTANSIC 0x00c82e Attansic Technology 84oui ATTANSIC 0x00c82e Attansic Technology
84oui RDC 0x00d02d RDC Semiconductor 
85oui JMICRON 0x00d831 JMicron 85oui JMICRON 0x00d831 JMicron
86oui PMCSIERRA 0x00e004 PMC-Sierra 86oui PMCSIERRA 0x00e004 PMC-Sierra
87oui SIS 0x00e006 Silicon Integrated Systems 87oui SIS 0x00e006 Silicon Integrated Systems
88oui REALTEK 0x00e04c RealTek 88oui REALTEK 0x00e04c RealTek
89oui ADMTEK 0x00e092 ADMtek 89oui ADMTEK 0x00e092 ADMtek
90oui XAQTI 0x00e0ae XaQti Corp. 90oui XAQTI 0x00e0ae XaQti Corp.
91oui NATSEMI 0x080017 National Semiconductor 91oui NATSEMI 0x080017 National Semiconductor
92oui TI 0x080028 Texas Instruments 92oui TI 0x080028 Texas Instruments
93oui BROADCOM4 0x18c086 Broadcom Corporation 93oui BROADCOM4 0x18c086 Broadcom Corporation
94oui RENESAS 0x749050 Renesas 94oui RENESAS 0x749050 Renesas
95 95
96/* Unregistered or wrong OUI */ 96/* Unregistered or wrong OUI */
97oui yyREALTEK 0x000004 Realtek 97oui yyREALTEK 0x000004 Realtek
98oui yyAMD 0x000058 Advanced Micro Devices 98oui yyAMD 0x000058 Advanced Micro Devices
 99oui xxVIA 0x0002c6 VIA Technologies
99oui xxMYSON 0x00032d Myson Technology 100oui xxMYSON 0x00032d Myson Technology
100oui xxTSC 0x00039c TDK Semiconductor 101oui xxTSC 0x00039c TDK Semiconductor
101oui xxASIX 0x000674 Asix Semiconductor 102oui xxASIX 0x000674 Asix Semiconductor
102oui xxDAVICOM 0x000676 Davicom Semiconductor 103oui xxDAVICOM 0x000676 Davicom Semiconductor
103oui xxAMLOGIC 0x00068a Amlogic 104oui xxAMLOGIC 0x00068a Amlogic
104oui xxQUALSEMI 0x00068a Quality Semiconductor 105oui xxQUALSEMI 0x00068a Quality Semiconductor
105oui xxREALTEK 0x000732 Realtek 106oui xxREALTEK 0x000732 Realtek
106oui xxBROADCOM 0x000818 Broadcom Corporation 107oui xxBROADCOM 0x000818 Broadcom Corporation
107oui xxPMCSIERRA 0x0009c0 PMC-Sierra 108oui xxPMCSIERRA 0x0009c0 PMC-Sierra
108oui xxICPLUS 0x0009c3 IC Plus Corp. 109oui xxICPLUS 0x0009c3 IC Plus Corp.
109oui xxMARVELL 0x000ac2 Marvell Semiconductor 110oui xxMARVELL 0x000ac2 Marvell Semiconductor
110oui xxINTEL 0x001f00 Intel 111oui xxINTEL 0x001f00 Intel
111oui xxBROADCOM_ALT1 0x0050ef Broadcom Corporation 112oui xxBROADCOM_ALT1 0x0050ef Broadcom Corporation
112oui yyINTEL 0x005500 Intel 113oui yyINTEL 0x005500 Intel
113oui yyASIX 0x007063 Asix Semiconductor 114oui yyASIX 0x007063 Asix Semiconductor
114oui xxVITESSE 0x008083 Vitesse Semiconductor 115oui xxVITESSE 0x008083 Vitesse Semiconductor
115oui xxPMCSIERRA2 0x009057 PMC-Sierra 116oui xxPMCSIERRA2 0x009057 PMC-Sierra
116oui xxCICADA 0x00c08f Cicada Semiconductor 117oui xxCICADA 0x00c08f Cicada Semiconductor
 118oui xxRDC 0x00d02d RDC Semiconductor
117oui xxNATSEMI 0x1000e8 National Semiconductor 119oui xxNATSEMI 0x1000e8 National Semiconductor
118oui xxLEVEL1 0x782000 Level 1 120oui xxLEVEL1 0x782000 Level 1
119oui xxXAQTI 0xace000 XaQti Corp. 121oui xxXAQTI 0xace000 XaQti Corp.
120 122
121/* 123/*
122 * List of known models. Grouped by oui. 124 * List of known models. Grouped by oui.
123 */ 125 */
124 126
125/* 127/*
126 * Agere PHYs 128 * Agere PHYs
127 */ 129 */
128model AGERE ET1011 0x0001 ET1011 10/100/1000baseT PHY 130model AGERE ET1011 0x0001 ET1011 10/100/1000baseT PHY
129model AGERE ET1011C 0x0004 ET1011C 10/100/1000baseT PHY 131model AGERE ET1011C 0x0004 ET1011C 10/100/1000baseT PHY
@@ -204,26 +206,27 @@ model BROADCOM2 BCM5708S 0x0015 BCM5708S @@ -204,26 +206,27 @@ model BROADCOM2 BCM5708S 0x0015 BCM5708S
204model BROADCOM2 BCM5785 0x0016 BCM5785 1000BASE-T media interface 206model BROADCOM2 BCM5785 0x0016 BCM5785 1000BASE-T media interface
205model BROADCOM2 BCM5709CAX 0x002c BCM5709CAX 10/100/1000baseT PHY 207model BROADCOM2 BCM5709CAX 0x002c BCM5709CAX 10/100/1000baseT PHY
206model BROADCOM2 BCM5722 0x002d BCM5722 1000BASE-T media interface 208model BROADCOM2 BCM5722 0x002d BCM5722 1000BASE-T media interface
207model BROADCOM2 BCM5784 0x003a BCM5784 10/100/1000baseT PHY 209model BROADCOM2 BCM5784 0x003a BCM5784 10/100/1000baseT PHY
208model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY 210model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY
209model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY 211model BROADCOM2 BCM5761 0x003d BCM5761 10/100/1000baseT PHY
210model BROADCOM2 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY 212model BROADCOM2 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY
211model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface 213model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface
212model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface 214model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface
213model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface 215model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface
214model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface 216model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface
215model BROADCOM3 BCM53125 0x0032 BCM53125 1000BASE-T switch 217model BROADCOM3 BCM53125 0x0032 BCM53125 1000BASE-T switch
216model BROADCOM3 BCM5720C 0x0036 BCM5720C 1000BASE-T media interface 218model BROADCOM3 BCM5720C 0x0036 BCM5720C 1000BASE-T media interface
 219model BROADCOM4 BCM54213PE 0x000a BCM54213PE 1000BASE-T media interface
217model BROADCOM4 BCM5725C 0x0038 BCM5725C 1000BASE-T media interface 220model BROADCOM4 BCM5725C 0x0038 BCM5725C 1000BASE-T media interface
218model xxBROADCOM_ALT1 BCM5906 0x0004 BCM5906 10/100baseTX media interface 221model xxBROADCOM_ALT1 BCM5906 0x0004 BCM5906 10/100baseTX media interface
219 222
220/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */ 223/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */
221 224
222model xxCICADA CIS8201 0x0001 Cicada CIS8201 10/100/1000TX PHY 225model xxCICADA CIS8201 0x0001 Cicada CIS8201 10/100/1000TX PHY
223model xxCICADA CIS8204 0x0004 Cicada CIS8204 10/100/1000TX PHY 226model xxCICADA CIS8204 0x0004 Cicada CIS8204 10/100/1000TX PHY
224model xxCICADA VSC8211 0x000b Cicada VSC8211 10/100/1000TX PHY 227model xxCICADA VSC8211 0x000b Cicada VSC8211 10/100/1000TX PHY
225model xxCICADA VSC8221 0x0015 Vitesse VSC8221 10/100/1000BASE-T PHY 228model xxCICADA VSC8221 0x0015 Vitesse VSC8221 10/100/1000BASE-T PHY
226model xxCICADA VSC8224 0x0018 Vitesse VSC8224 10/100/1000BASE-T PHY 229model xxCICADA VSC8224 0x0018 Vitesse VSC8224 10/100/1000BASE-T PHY
227model xxCICADA CIS8201A 0x0020 Cicada CIS8201 10/100/1000TX PHY 230model xxCICADA CIS8201A 0x0020 Cicada CIS8201 10/100/1000TX PHY
228model xxCICADA CIS8201B 0x0021 Cicada CIS8201 10/100/1000TX PHY 231model xxCICADA CIS8201B 0x0021 Cicada CIS8201 10/100/1000TX PHY
229model xxCICADA VSC8234 0x0022 Vitesse VSC8234 10/100/1000TX PHY 232model xxCICADA VSC8234 0x0022 Vitesse VSC8234 10/100/1000TX PHY
@@ -346,60 +349,65 @@ model xxNATSEMI DP83861 0x0006 DP83861  @@ -346,60 +349,65 @@ model xxNATSEMI DP83861 0x0006 DP83861
346model xxNATSEMI DP83865 0x0007 DP83865 1000BASE-T media interface 349model xxNATSEMI DP83865 0x0007 DP83865 1000BASE-T media interface
347model xxNATSEMI DP83849 0x000a DP83849 10/100 media interface 350model xxNATSEMI DP83849 0x000a DP83849 10/100 media interface
348 351
349/* PMC Sierra PHYs */ 352/* PMC Sierra PHYs */
350model xxPMCSIERRA PM8351 0x0000 PM8351 OctalPHY Gigabit interface 353model xxPMCSIERRA PM8351 0x0000 PM8351 OctalPHY Gigabit interface
351model xxPMCSIERRA2 PM8352 0x0002 PM8352 OctalPHY Gigabit interface 354model xxPMCSIERRA2 PM8352 0x0002 PM8352 OctalPHY Gigabit interface
352model xxPMCSIERRA2 PM8353 0x0003 PM8353 QuadPHY Gigabit interface 355model xxPMCSIERRA2 PM8353 0x0003 PM8353 QuadPHY Gigabit interface
353model PMCSIERRA PM8354 0x0004 PM8354 QuadPHY Gigabit interface 356model PMCSIERRA PM8354 0x0004 PM8354 QuadPHY Gigabit interface
354 357
355/* Quality Semiconductor PHYs */ 358/* Quality Semiconductor PHYs */
356model xxQUALSEMI QS6612 0x0000 QS6612 10/100 media interface 359model xxQUALSEMI QS6612 0x0000 QS6612 10/100 media interface
357 360
358/* RDC Semiconductor PHYs */ 361/* RDC Semiconductor PHYs */
359model RDC R6040 0x0003 R6040 10/100 media interface 362model xxRDC R6040 0x0003 R6040 10/100 media interface
 363model xxRDC R6040_2 0x0005 R6040 10/100 media interface
 364model xxRDC R6040_3 0x0006 R6040 10/100 media interface
360 365
361/* RealTek PHYs */ 366/* RealTek PHYs */
362model xxREALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface 367model xxREALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface
363model yyREALTEK RTL8201L 0x0020 RTL8201L 10/100 media interface 368model yyREALTEK RTL8201L 0x0020 RTL8201L 10/100 media interface
364model REALTEK RTL8251 0x0000 RTL8251 1000BASE-T media interface 369model REALTEK RTL8251 0x0000 RTL8251 1000BASE-T media interface
365model REALTEK RTL8201E 0x0008 RTL8201E 10/100 media interface 370model REALTEK RTL8201E 0x0008 RTL8201E 10/100 media interface
366model REALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface 371model REALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface
367 372
368/* Seeq PHYs */ 373/* Seeq PHYs */
369model SEEQ 80220 0x0003 Seeq 80220 10/100 media interface 374model SEEQ 80220 0x0003 Seeq 80220 10/100 media interface
370model SEEQ 84220 0x0004 Seeq 84220 10/100 media interface 375model SEEQ 84220 0x0004 Seeq 84220 10/100 media interface
371model SEEQ 80225 0x0008 Seeq 80225 10/100 media interface 376model SEEQ 80225 0x0008 Seeq 80225 10/100 media interface
372 377
373/* Silicon Integrated Systems PHYs */ 378/* Silicon Integrated Systems PHYs */
374model SIS 900 0x0000 SiS 900 10/100 media interface 379model SIS 900 0x0000 SiS 900 10/100 media interface
375 380
376/* SMSC PHYs */ 381/* SMSC PHYs */
377model SMSC LAN83C185 0x000a SMSC LAN83C185 10/100 PHY 382model SMSC LAN83C185 0x000a SMSC LAN83C185 10/100 PHY
378model SMSC LAN8700 0x000c SMSC LAN8700 10/100 Ethernet Transceiver 383model SMSC LAN8700 0x000c SMSC LAN8700 10/100 Ethernet Transceiver
379model SMSC LAN911X 0x000d SMSC LAN911X internal 10/100 PHY 384model SMSC LAN911X 0x000d SMSC LAN911X internal 10/100 PHY
380model SMSC LAN75XX 0x000e SMSC LAN75XX internal 10/100 PHY 385model SMSC LAN75XX 0x000e SMSC LAN75XX internal 10/100 PHY
381model SMSC LAN8710_LAN8720 0x000f SMSC LAN8710/LAN8720 10/100 Ethernet Transceiver 386model SMSC LAN8710_LAN8720 0x000f SMSC LAN8710/LAN8720 10/100 Ethernet Transceiver
382model SMSC LAN8740 0x0011 SMSC LAN8740 10/100 media interface 387model SMSC LAN8740 0x0011 SMSC LAN8740 10/100 media interface
383model SMSC LAN8741A 0x0012 SMSC LAN8741A 10/100 media interface 388model SMSC LAN8741A 0x0012 SMSC LAN8741A 10/100 media interface
384model SMSC LAN8742 0x0013 SMSC LAN8742 10/100 media interface 389model SMSC LAN8742 0x0013 SMSC LAN8742 10/100 media interface
385 390
 391/* Teranetics PHY */
 392model TERANETICS TN1010 0x0001 Teranetics TN1010 10GBase-T PHY
 393
386/* Texas Instruments PHYs */ 394/* Texas Instruments PHYs */
387model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface 395model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface
388model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface 396model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface
389model TI TNETE2101 0x0003 TNETE2101 media interface 397model TI TNETE2101 0x0003 TNETE2101 media interface
390 398
391/* TDK Semiconductor PHYs */ 399/* TDK Semiconductor PHYs */
392model xxTSC 78Q2120 0x0014 78Q2120 10/100 media interface 400model xxTSC 78Q2120 0x0014 78Q2120 10/100 media interface
393model xxTSC 78Q2121 0x0015 78Q2121 100BASE-TX media interface 401model xxTSC 78Q2121 0x0015 78Q2121 100BASE-TX media interface
394 402
395/* VIA Technologies PHYs */ 403/* VIA Technologies PHYs */
396model VIA VT6103 0x0032 VT6103 10/100 PHY 404model xxVIA VT6103 0x0032 VT6103 10/100 PHY
397model VIA VT6103_2 0x0034 VT6103 10/100 PHY 405model xxVIA VT6103_2 0x0034 VT6103 10/100 PHY
398 406
399/* Vitesse PHYs (Now Microsemi) */ 407/* Vitesse PHYs (Now Microsemi) */
400model xxVITESSE VSC8601 0x0002 VSC8601 10/100/1000 PHY 408model xxVITESSE VSC8601 0x0002 VSC8601 10/100/1000 PHY
401model xxVITESSE VSC8641 0x0003 Vitesse VSC8641 10/100/1000TX PHY 409model xxVITESSE VSC8641 0x0003 Vitesse VSC8641 10/100/1000TX PHY
402model xxVITESSE VSC8501 0x0013 Vitesse VSC8501 10/100/1000TX PHY 410model xxVITESSE VSC8501 0x0013 Vitesse VSC8501 10/100/1000TX PHY
403 411
404/* XaQti Corp. PHYs */ 412/* XaQti Corp. PHYs */
405model xxXAQTI XMACII 0x0000 XaQti Corp. XMAC II gigabit interface 413model xxXAQTI XMACII 0x0000 XaQti Corp. XMAC II gigabit interface

cvs diff -r1.4 -r1.4.4.1 src/sys/dev/mii/rdcphy.c (expand / switch to unified diff)

--- src/sys/dev/mii/rdcphy.c 2019/03/25 09:20:46 1.4
+++ src/sys/dev/mii/rdcphy.c 2020/04/14 16:43:12 1.4.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rdcphy.c,v 1.4 2019/03/25 09:20:46 msaitoh Exp $ */ 1/* $NetBSD: rdcphy.c,v 1.4.4.1 2020/04/14 16:43:12 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org> 4 * Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice unmodified, this list of conditions, and the following 11 * notice unmodified, this list of conditions, and the following
12 * disclaimer. 12 * disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 */ 28 */
29 29
30/* FreeBSD: src/sys/dev/mii/rdcphy.c,v 1.1 2010/12/30 23:50:25 yongari Exp */ 30/* FreeBSD: src/sys/dev/mii/rdcphy.c,v 1.1 2010/12/30 23:50:25 yongari Exp */
31 31
32/* 32/*
33 * Driver for the RDC Semiconductor R6040 10/100 PHY. 33 * Driver for the RDC Semiconductor R6040 10/100 PHY.
34 */ 34 */
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: rdcphy.c,v 1.4 2019/03/25 09:20:46 msaitoh Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: rdcphy.c,v 1.4.4.1 2020/04/14 16:43:12 martin Exp $");
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/kernel.h> 40#include <sys/kernel.h>
41#include <sys/device.h> 41#include <sys/device.h>
42#include <sys/socket.h> 42#include <sys/socket.h>
43#include <sys/errno.h> 43#include <sys/errno.h>
44 44
45#include <sys/bus.h> 45#include <sys/bus.h>
46 46
47#include <net/if.h> 47#include <net/if.h>
48#include <net/if_media.h> 48#include <net/if_media.h>
49 49
@@ -64,27 +64,29 @@ static void rdcphyattach(device_t, devic @@ -64,27 +64,29 @@ static void rdcphyattach(device_t, devic
64 64
65CFATTACH_DECL_NEW(rdcphy, sizeof(struct rdcphy_softc), 65CFATTACH_DECL_NEW(rdcphy, sizeof(struct rdcphy_softc),
66 rdcphymatch, rdcphyattach, mii_phy_detach, mii_phy_activate); 66 rdcphymatch, rdcphyattach, mii_phy_detach, mii_phy_activate);
67 67
68 68
69static int rdcphy_service(struct mii_softc *, struct mii_data *, int); 69static int rdcphy_service(struct mii_softc *, struct mii_data *, int);
70static void rdcphy_status(struct mii_softc *); 70static void rdcphy_status(struct mii_softc *);
71 71
72static const struct mii_phy_funcs rdcphy_funcs = { 72static const struct mii_phy_funcs rdcphy_funcs = {
73 rdcphy_service, rdcphy_status, mii_phy_reset, 73 rdcphy_service, rdcphy_status, mii_phy_reset,
74}; 74};
75 75
76static const struct mii_phydesc rdcphys[] = { 76static const struct mii_phydesc rdcphys[] = {
77 MII_PHY_DESC(RDC, R6040), 77 MII_PHY_DESC(xxRDC, R6040),
 78 MII_PHY_DESC(xxRDC, R6040_2),
 79 MII_PHY_DESC(xxRDC, R6040_3),
78 MII_PHY_END, 80 MII_PHY_END,
79}; 81};
80 82
81static int 83static int
82rdcphymatch(device_t parent, cfdata_t match, void *aux) 84rdcphymatch(device_t parent, cfdata_t match, void *aux)
83{ 85{
84 struct mii_attach_args *ma = aux; 86 struct mii_attach_args *ma = aux;
85 87
86 if (mii_phy_match(ma, rdcphys) != NULL) 88 if (mii_phy_match(ma, rdcphys) != NULL)
87 return 10; 89 return 10;
88 90
89 return 0; 91 return 0;
90} 92}