CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 25 15:57:50 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1457


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.7 -r1.128.6.8 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.7 -r1.116.6.8 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.128.6.7 src/sys/dev/mii/miidevs.h:1.128.6.8
--- src/sys/dev/mii/miidevs.h:1.128.6.7	Thu Oct 24 15:59:13 2019
+++ src/sys/dev/mii/miidevs.h	Mon Nov 25 15:57:49 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.128.6.7 2019/10/24 15:59:13 martin Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.128.6.8 2019/11/25 15:57:49 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp
+ *	NetBSD: miidevs,v 1.125.6.8 2019/11/25 15:57:23 martin Exp
  */
 
 /*-
@@ -72,7 +72,9 @@
 #define	MII_OUI_ENABLESEMI	0x0010dd	/* Enable Semiconductor */
 #define	MII_OUI_SUNPLUS	0x001105	/* Sunplus Technology */
 #define	MII_OUI_ATHEROS	0x001374	/* Atheros */
+#define	MII_OUI_TERANETICS	0x0014a6	/* Teranetics */
 #define	MII_OUI_RALINK2	0x0017a5	/* Ralink Technology */
+#define	MII_OUI_AQUANTIA	0x0017b6	/* Aquantia Corporation */
 #define	MII_OUI_BROADCOM3	0x001be9	/* Broadcom Corporation */
 #define	MII_OUI_LEVEL1	0x00207b	/* Level 1 */
 #define	MII_OUI_VIA	0x004063	/* VIA Technologies */
@@ -81,7 +83,6 @@
 #define	MII_OUI_AMLOGIC	0x006051	/* Amlogic */
 #define	MII_OUI_DAVICOM	0x00606e	/* Davicom Semiconductor */
 #define	MII_OUI_SMSC	0x00800f	/* SMSC */
-#define	MII_OUI_ICPLUS	0x0090c3	/* IC Plus Corp. */
 #define	MII_OUI_SEEQ	0x00a07d	/* Seeq */
 #define	MII_OUI_ICS	0x00a0be	/* Integrated Circuit Systems */
 #define	MII_OUI_INTEL	0x00aa00	/* Intel */
@@ -98,8 +99,9 @@
 #define	MII_OUI_NATSEMI	0x080017	/* National Semiconductor */
 #define	MII_OUI_TI	0x080028	/* Texas Instruments */
 #define	MII_OUI_BROADCOM4	0x18c086	/* Broadcom Corporation */
+#define	MII_OUI_RENESAS	0x749050	/* Renesas */
 
-/* Unregisterd or wrong OUI */
+/* Unregistered or wrong OUI */
 #define	MII_OUI_yyREALTEK	0x04	/* Realtek */
 #define	MII_OUI_yyAMD	0x58	/* Advanced Micro Devices */
 #define	MII_OUI_xxMYSON	0x00032d	/* Myson Technology */
@@ -111,6 +113,7 @@
 #define	MII_OUI_xxREALTEK	0x000732	/* Realtek */
 #define	MII_OUI_xxBROADCOM	0x000818	/* Broadcom Corporation */
 #define	MII_OUI_xxPMCSIERRA	0x0009c0	/* PMC-Sierra */
+#define	MII_OUI_xxICPLUS	0x0009c3	/* IC Plus Corp. */
 #define	MII_OUI_xxMARVELL	0x000ac2	/* Marvell Semiconductor */
 #define	MII_OUI_xxINTEL	0x001f00	/* Intel */
 #define	MII_OUI_xxBROADCOM_ALT1	0x0050ef	/* Broadcom Corporation */
@@ -341,14 +344,14 @@
 #define	MII_STR_xxDAVICOM_DM9601	"DM9601 internal 10/100 media interface"
 
 /* IC Plus Corp. PHYs */
-#define	MII_MODEL_ICPLUS_IP100	0x0004
-#define	MII_STR_ICPLUS_IP100	"IP100 10/100 PHY"
-#define	MII_MODEL_ICPLUS_IP101	0x0005
-#define	MII_STR_ICPLUS_IP101	"IP101 10/100 PHY"
-#define	MII_MODEL_ICPLUS_IP1000A	0x0008
-#define	MII_STR_ICPLUS_IP1000A	"IP1000A 10/100/1000 PHY"
-#define	MII_MODEL_ICPLUS_IP1001	0x0019
-#define	MII_STR_ICPLUS_IP1001	"IP1001 10/100/1000 PHY"
+#define	MII_MODEL_xxICPLUS_IP100	0x0004
+#define	MII_STR_xxICPLUS_IP100	"IP100 10/100 PHY"
+#define	MII_MODEL_xxICPLUS_IP101	0x0005
+#define	MII_STR_xxICPLUS_IP101	"IP101 10/100 PHY"
+#define	MII_MODEL_xxICPLUS_IP1000A	0x0008
+#define	MII_STR_xxICPLUS_IP1000A	"IP1000A 10/100/1000 PHY"
+#define	MII_MODEL_xxICPLUS_IP1001	0x0019
+#define	MII_STR_xxICPLUS_IP1001	"IP1001 10/100/1000 PHY"
 
 /* Integrated Circuit Systems PHYs */
 #define	MII_MODEL_ICS_1889	0x0001
@@ -406,10 +409,10 @@
 
 
 /* JMicron PHYs */
-#define	MII_MODEL_JMICRON_JMC250	0x0021
-#define	MII_STR_JMICRON_JMC250	"JMC250 10/100/1000 media interface"
-#define	MII_MODEL_JMICRON_JMC260	0x0022
-#define	MII_STR_JMICRON_JMC260	"JMC260 10/100 media interface"
+#define	MII_MODEL_JMICRON_JMP211	0x0021
+#define	MII_STR_JMICRON_JMP211	"JMP211 10/100/1000 media interface"
+#define	MII_MODEL_JMICRON_JMP202	0x0022
+#define	MII_STR_JMICRON_JMP202	"JMP202 10/100 media interface"
 
 /* Level 1 PHYs */
 #define	MII_MODEL_xxLEVEL1_LXT970	0x

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.116.6.7 src/sys/dev/mii/miidevs_data.h:1.116.6.8
--- src/sys/dev/mii/miidevs_data.h:1.116.6.7	Thu Oct 24 15:59:13 2019
+++ src/sys/dev/mii/miidevs_data.h	Mon Nov 25 15:57:49 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.116.6.7 2019/10/24 15:59:13 martin Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.116.6.8 2019/11/25 15:57:49 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp
+ *	

CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 25 15:57:50 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1457


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.7 -r1.128.6.8 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.7 -r1.116.6.8 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 25 15:57:23 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs rlphy.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1457:

sys/dev/mii/miidevs 1.155-1.157, 1.159-1.160
sys/dev/mii/rlphy.c 1.37 via patch

- miidevs update:
 - Add Teranetics, Aquantia and Renesas.
 - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3).
 - Fix typo. from vezhlys.
 - Rename JMICRON 0x0021 from JMC250 to JMP211
 - Rename JMICRON 0x0022 from JMC260 to JMP202
- rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing
  "Realtek internal PHY".


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.7 -r1.125.6.8 src/sys/dev/mii/miidevs
cvs rdiff -u -r1.30 -r1.30.10.1 src/sys/dev/mii/rlphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.125.6.7 src/sys/dev/mii/miidevs:1.125.6.8
--- src/sys/dev/mii/miidevs:1.125.6.7	Thu Oct 24 15:58:45 2019
+++ src/sys/dev/mii/miidevs	Mon Nov 25 15:57:23 2019
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp $
+$NetBSD: miidevs,v 1.125.6.8 2019/11/25 15:57:23 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -65,7 +65,9 @@ oui ALTIMA			0x0010a9	Altima Communicati
 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 VIA0x004063	VIA Technologies
@@ -74,7 +76,6 @@ oui QUALSEMI			0x006051	Quality Semicond
 oui AMLOGIC			0x006051	Amlogic
 oui DAVICOM			0x00606e	Davicom Semiconductor
 oui SMSC			0x00800f	SMSC
-oui ICPLUS			0x0090c3	IC Plus Corp.
 oui SEEQ			0x00a07d	Seeq
 oui ICS0x00a0be	Integrated Circuit Systems
 oui INTEL			0x00aa00	Intel
@@ -91,8 +92,9 @@ oui XAQTI			0x00e0ae	XaQti Corp.
 oui NATSEMI			0x080017	National Semiconductor
 oui TI0x080028	Texas Instruments
 oui BROADCOM4			0x18c086	Broadcom Corporation
+oui RENESAS			0x749050	Renesas
 
-/* Unregisterd or wrong OUI */
+/* Unregistered or wrong OUI */
 oui yyREALTEK			0x04	Realtek
 oui yyAMD			0x58	Advanced Micro Devices
 oui xxMYSON			0x00032d	Myson Technology
@@ -104,6 +106,7 @@ oui xxQUALSEMI			0x00068a	Quality Semico
 oui xxREALTEK			0x000732	Realtek
 oui xxBROADCOM			0x000818	Broadcom Corporation
 oui xxPMCSIERRA			0x0009c0	PMC-Sierra
+oui xxICPLUS			0x0009c3	IC Plus Corp.
 oui xxMARVELL			0x000ac2	Marvell Semiconductor
 oui xxINTEL			0x001f00	Intel
 oui xxBROADCOM_ALT1		0x0050ef	Broadcom Corporation
@@ -241,10 +244,10 @@ model xxDAVICOM DM9161B		0x000b DM9161[B
 model xxDAVICOM DM9601		0x000c DM9601 internal 10/100 media interface
 
 /* IC Plus Corp. PHYs */
-model ICPLUS IP100		0x0004 IP100 10/100 PHY
-model ICPLUS IP101		0x0005 IP101 10/100 PHY
-model ICPLUS IP1000A		0x0008 IP1000A 10/100/1000 PHY
-model ICPLUS IP1001		0x0019 IP1001 10/100/1000 PHY
+model xxICPLUS IP100		0x0004 IP100 10/100 PHY
+model xxICPLUS IP101		0x0005 IP101 10/100 PHY
+model xxICPLUS IP1000A		0x0008 IP1000A 10/100/1000 PHY
+model xxICPLUS IP1001		0x0019 IP1001 10/100/1000 PHY
 
 /* Integrated Circuit Systems PHYs */
 model ICS 1889			0x0001 ICS1889 10/100 media interface
@@ -277,8 +280,8 @@ model ATTANSIC I82578		0x0004 Intel 8257
 
 
 /* JMicron PHYs */
-model JMICRON JMC250		0x0021 JMC250 10/100/1000 media interface
-model JMICRON JMC260		0x0022 JMC260 10/100 media interface
+model JMICRON JMP211		0x0021 JMP211 10/100/1000 media interface
+model JMICRON JMP202		0x0022 JMP202 10/100 media interface
 
 /* Level 1 PHYs */
 model xxLEVEL1 LXT970		0x LXT970 10/100 media interface

Index: src/sys/dev/mii/rlphy.c
diff -u src/sys/dev/mii/rlphy.c:1.30 src/sys/dev/mii/rlphy.c:1.30.10.1
--- src/sys/dev/mii/rlphy.c:1.30	Thu Jul  7 06:55:41 2016
+++ src/sys/dev/mii/rlphy.c	Mon Nov 25 15:57:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rlphy.c,v 1.30 2016/07/07 06:55:41 msaitoh Exp $	*/
+/*	$NetBSD: rlphy.c,v 1.30.10.1 2019/11/25 15:57:23 martin Exp $	*/
 /*	$OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $	*/
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.30 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.30.10.1 2019/11/25 15:57:23 martin Exp $");
 
 #include 
 #include 
@@ -79,8 +79,8 @@ const struct mii_phy_funcs rlphy_funcs =
 static const struct mii_phydesc rlphys[] = {
 	{ MII_OUI_yyREALTEK,		MII_MODEL_yyREALTEK_RTL8201L,
 	  MII_STR_yyREALTEK_RTL8201L },
-	{ MII_OUI_ICPLUS,		MII_MODEL_ICPLUS_IP101,
-	  MII_STR_ICPLUS_IP101 },
+	{ MII_OUI_xxICPLUS,		MII_MODEL_xxICPLUS_IP101,
+	  MII_STR_xxICPLUS_IP101 },
 
 	{ 0,0,
 	 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 25 15:57:23 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs rlphy.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1457:

sys/dev/mii/miidevs 1.155-1.157, 1.159-1.160
sys/dev/mii/rlphy.c 1.37 via patch

- miidevs update:
 - Add Teranetics, Aquantia and Renesas.
 - Change ICPLUS(0x0090c3) to xxICPLUS(0x0009c3).
 - Fix typo. from vezhlys.
 - Rename JMICRON 0x0021 from JMC250 to JMP211
 - Rename JMICRON 0x0022 from JMC260 to JMP202
- rlphy(4): Print model name if it's ICPLUS IP101 to avoid printing
  "Realtek internal PHY".


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.7 -r1.125.6.8 src/sys/dev/mii/miidevs
cvs rdiff -u -r1.30 -r1.30.10.1 src/sys/dev/mii/rlphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 21 14:06:16 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: atphy.c mii_physubr.c miivar.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1454:

sys/dev/mii/atphy.c 1.22-1.23, 1.25 via patch
sys/dev/mii/mii_physubr.c   1.88 via patch
sys/dev/mii/miivar.h1.69 via patch

- Fix a bug that atphy(4) can't negotiate correctly when the media
  setting is neither auto nor 1000baseT.
- Code cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.80.26.1 -r1.80.26.2 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.62 -r1.62.20.1 src/sys/dev/mii/miivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 21 14:06:16 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: atphy.c mii_physubr.c miivar.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1454:

sys/dev/mii/atphy.c 1.22-1.23, 1.25 via patch
sys/dev/mii/mii_physubr.c   1.88 via patch
sys/dev/mii/miivar.h1.69 via patch

- Fix a bug that atphy(4) can't negotiate correctly when the media
  setting is neither auto nor 1000baseT.
- Code cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.80.26.1 -r1.80.26.2 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.62 -r1.62.20.1 src/sys/dev/mii/miivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.18 src/sys/dev/mii/atphy.c:1.18.8.1
--- src/sys/dev/mii/atphy.c:1.18	Wed Nov  2 10:11:32 2016
+++ src/sys/dev/mii/atphy.c	Thu Nov 21 14:06:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.18 2016/11/02 10:11:32 msaitoh Exp $ */
+/*	$NetBSD: atphy.c,v 1.18.8.1 2019/11/21 14:06:16 martin Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.18 2016/11/02 10:11:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.18.8.1 2019/11/21 14:06:16 martin Exp $");
 
 #include 
 #include 
@@ -90,7 +90,7 @@ const struct mii_phy_funcs atphy_funcs =
 atphy_service, atphy_status, atphy_reset,
 };
 
-static const struct mii_phydesc etphys[] = {
+static const struct mii_phydesc atphys[] = {
 	{ MII_OUI_ATHEROS,	MII_MODEL_ATHEROS_F1,
 	  MII_STR_ATHEROS_F1 },
 	{ MII_OUI_ATTANSIC,	MII_MODEL_ATTANSIC_L1,
@@ -124,7 +124,7 @@ atphy_match(device_t parent, cfdata_t ma
 {
 	struct mii_attach_args *ma = aux;
 
-	if (mii_phy_match(ma, etphys) != NULL)
+	if (mii_phy_match(ma, atphys) != NULL)
 		return 10;
 
 	return 0;
@@ -139,7 +139,7 @@ atphy_attach(device_t parent, device_t s
 	const struct mii_phydesc *mpd;
 	uint16_t bmsr;
 
-	mpd = mii_phy_match(ma, etphys);
+	mpd = mii_phy_match(ma, atphys);
 	aprint_naive(": Media interface\n");
 	aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
 
@@ -231,8 +231,8 @@ atphy_service(struct mii_softc *sc, stru
 			return EINVAL;
 		}
 
-		anar = mii_anar(IFM_SUBTYPE(ife->ifm_media));
-		if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) {
+		anar = mii_anar(ife);
+		if ((ife->ifm_media & IFM_FDX) != 0) {
 			bmcr |= BMCR_FDX;
 			/* Enable pause. */
 			if (sc->mii_flags & MIIF_DOPAUSE)

Index: src/sys/dev/mii/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.80.26.1 src/sys/dev/mii/mii_physubr.c:1.80.26.2
--- src/sys/dev/mii/mii_physubr.c:1.80.26.1	Sun Dec 30 12:16:16 2018
+++ src/sys/dev/mii/mii_physubr.c	Thu Nov 21 14:06:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.80.26.1 2018/12/30 12:16:16 martin Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.80.26.2 2019/11/21 14:06:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.80.26.1 2018/12/30 12:16:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.80.26.2 2019/11/21 14:06:16 martin Exp $");
 
 #include 
 #include 
@@ -692,19 +692,16 @@ mii_phy_resume(device_t dv, const pmf_qu
 
 
 /*
- * Given an ifmedia word, return the corresponding ANAR value.
+ * Given an ifmedia_entry, return the corresponding ANAR value.
  */
 int
-mii_anar(int media)
+mii_anar(struct ifmedia_entry *ife)
 {
-	int rv;
 
 #ifdef DIAGNOSTIC
-	if (/* media < 0 || */ media >= MII_NMEDIA)
+	if (ife->ifm_data >= MII_NMEDIA)
 		panic("mii_anar");
 #endif
 
-	rv = mii_media_table[media].mm_anar;
-
-	return rv;
+	return mii_media_table[ife->ifm_data].mm_anar;
 }

Index: src/sys/dev/mii/miivar.h
diff -u src/sys/dev/mii/miivar.h:1.62 src/sys/dev/mii/miivar.h:1.62.20.1
--- src/sys/dev/mii/miivar.h:1.62	Wed May 28 09:49:55 2014
+++ src/sys/dev/mii/miivar.h	Thu Nov 21 14:06:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: miivar.h,v 1.62 2014/05/28 09:49:55 msaitoh Exp $	*/
+/*	$NetBSD: miivar.h,v 1.62.20.1 2019/11/21 14:06:16 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -235,7 +235,7 @@ int	mii_mediachg(struct mii_data *);
 void	mii_tick(struct mii_data *);
 void	mii_pollstat(struct mii_data *);
 void	mii_down(struct mii_data *);
-int	mii_anar(int);
+int	mii_anar(struct ifmedia_entry *);
 
 int mii_ifmedia_change(struct mii_data *);
 



CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  6 09:55:15 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ukphy_subr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1426):

sys/dev/mii/ukphy_subr.c: revision 1.16

Fix a bug that ukphy_status() misunderstand master mode.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.20.1 src/sys/dev/mii/ukphy_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-11-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  6 09:55:15 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ukphy_subr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1426):

sys/dev/mii/ukphy_subr.c: revision 1.16

Fix a bug that ukphy_status() misunderstand master mode.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.20.1 src/sys/dev/mii/ukphy_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/ukphy_subr.c
diff -u src/sys/dev/mii/ukphy_subr.c:1.13 src/sys/dev/mii/ukphy_subr.c:1.13.20.1
--- src/sys/dev/mii/ukphy_subr.c:1.13	Mon Jun 16 16:48:16 2014
+++ src/sys/dev/mii/ukphy_subr.c	Wed Nov  6 09:55:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ukphy_subr.c,v 1.13 2014/06/16 16:48:16 msaitoh Exp $	*/
+/*	$NetBSD: ukphy_subr.c,v 1.13.20.1 2019/11/06 09:55:15 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ukphy_subr.c,v 1.13 2014/06/16 16:48:16 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy_subr.c,v 1.13.20.1 2019/11/06 09:55:15 martin Exp $");
 
 #include 
 #include 
@@ -116,7 +116,7 @@ ukphy_status(struct mii_softc *phy)
 		else
 			mii->mii_media_active |= IFM_NONE;
 
-		if ((mii->mii_media_active & IFM_1000_T) &&
+		if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) &&
 		(gtsr & GTSR_MS_RES))
 			mii->mii_media_active |= IFM_ETH_MASTER;
 



CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:59:13 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1414


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.6 -r1.128.6.7 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.6 -r1.116.6.7 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.128.6.6 src/sys/dev/mii/miidevs.h:1.128.6.7
--- src/sys/dev/mii/miidevs.h:1.128.6.6	Thu Aug  1 14:24:21 2019
+++ src/sys/dev/mii/miidevs.h	Thu Oct 24 15:59:13 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.128.6.6 2019/08/01 14:24:21 martin Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.128.6.7 2019/10/24 15:59:13 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.125.6.6 2019/08/01 14:22:55 martin Exp
+ *	NetBSD: miidevs,v 1.125.6.7 2019/10/24 15:58:45 martin Exp
  */
 
 /*-
@@ -57,10 +57,8 @@
  */
 
 #define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
-#define	MII_OUI_VITESSE	0x0001c1	/* Vitesse */
 #define	MII_OUI_TRIDIUM	0x0001f0	/* Tridium */
 #define	MII_OUI_DATATRACK	0x0002c6	/* Data Track Technology */
-#define	MII_OUI_CICADA	0x0003f1	/* Cicada Semiconductor */
 #define	MII_OUI_AGERE	0x00053d	/* Agere */
 #define	MII_OUI_BANKSPEED	0x0006b8	/* Bankspeed Pty */
 #define	MII_OUI_NETEXCELL	0x0008bb	/* NetExcell */
@@ -118,6 +116,7 @@
 #define	MII_OUI_xxBROADCOM_ALT1	0x0050ef	/* Broadcom Corporation */
 #define	MII_OUI_yyINTEL	0x005500	/* Intel */
 #define	MII_OUI_yyASIX	0x007063	/* Asix Semiconductor */
+#define	MII_OUI_xxVITESSE	0x008083	/* Vitesse Semiconductor */
 #define	MII_OUI_xxPMCSIERRA2	0x009057	/* PMC-Sierra */
 #define	MII_OUI_xxCICADA	0x00c08f	/* Cicada Semiconductor */
 #define	MII_OUI_xxNATSEMI	0x1000e8	/* National Semiconductor */
@@ -303,23 +302,26 @@
 #define	MII_MODEL_xxBROADCOM_ALT1_BCM5906	0x0004
 #define	MII_STR_xxBROADCOM_ALT1_BCM5906	"BCM5906 10/100baseTX media interface"
 
-/* Cicada Semiconductor PHYs (now owned by Vitesse?) */
-#define	MII_MODEL_CICADA_CS8201	0x0001
-#define	MII_STR_CICADA_CS8201	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8204	0x0004
-#define	MII_STR_CICADA_CS8204	"Cicada CS8204 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_VSC8211	0x000b
-#define	MII_STR_CICADA_VSC8211	"Cicada VSC8211 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8201A	0x0020
-#define	MII_STR_CICADA_CS8201A	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8201B	0x0021
-#define	MII_STR_CICADA_CS8201B	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8244	0x002c
-#define	MII_STR_CICADA_CS8244	"Vitesse VSC8244 Quad 10/100/1000BASE-T PHY"
+/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */
+
+#define	MII_MODEL_xxCICADA_CIS8201	0x0001
+#define	MII_STR_xxCICADA_CIS8201	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_CIS8204	0x0004
+#define	MII_STR_xxCICADA_CIS8204	"Cicada CIS8204 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8211	0x000b
+#define	MII_STR_xxCICADA_VSC8211	"Cicada VSC8211 10/100/1000TX PHY"
 #define	MII_MODEL_xxCICADA_VSC8221	0x0015
 #define	MII_STR_xxCICADA_VSC8221	"Vitesse VSC8221 10/100/1000BASE-T PHY"
-#define	MII_MODEL_xxCICADA_CS8201B	0x0021
-#define	MII_STR_xxCICADA_CS8201B	"Cicada CS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8224	0x0018
+#define	MII_STR_xxCICADA_VSC8224	"Vitesse VSC8224 10/100/1000BASE-T PHY"
+#define	MII_MODEL_xxCICADA_CIS8201A	0x0020
+#define	MII_STR_xxCICADA_CIS8201A	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_CIS8201B	0x0021
+#define	MII_STR_xxCICADA_CIS8201B	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8234	0x0022
+#define	MII_STR_xxCICADA_VSC8234	"Vitesse VSC8234 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8244	0x002c
+#define	MII_STR_xxCICADA_VSC8244	"Vitesse VSC8244 Quad 10/100/1000BASE-T PHY"
 
 /* Davicom Semiconductor PHYs */
 /* AMD Am79C873 seems to be a relabeled DM9101 */
@@ -599,9 +601,13 @@
 #define	MII_MODEL_VIA_VT6103_2	0x0034
 #define	MII_STR_VIA_VT6103_2	"VT6103 10/100 PHY"
 
-/* Vitesse PHYs */
-#define	MII_MODEL_VITESSE_VSC8601	0x0002
-#define	MII_STR_VITESSE_VSC8601	"VSC8601 10/100/1000 PHY"
+/* Vitesse PHYs (Now Microsemi) */
+#define	MII_MODEL_xxVITESSE_VSC8601	0x0002
+#define	MII_STR_xxVITESSE_VSC8601	"VSC8601 10/100/1000 PHY"
+#define	MII_MODEL_xxVITESSE_VSC8641	0x0003
+#define	MII_STR_xxVITESSE_VSC8641	"Vitesse VSC8641 10/100/1000TX PHY"
+#define	MII_MODEL_xxVITESSE_VSC8501	0x0013
+#define	MII_STR_xxVITESSE_VSC8501	"Vitesse VSC8501 10/100/1000TX PHY"
 
 /* XaQti Corp. PHYs */
 #define	MII_MODEL_xxXAQTI_XMACII	0x

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.116.6.6 src/sys/dev/mii/miidevs_data.h:1.116.6.7
--- 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:59:13 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1414


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.6 -r1.128.6.7 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.6 -r1.116.6.7 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:58:45 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ciphy.c miidevs

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1414:

sys/dev/mii/ciphy.c 1.34-1.37 via patch
sys/dev/mii/miidevs 1.158

- Indicate master mode if the negotiated result say so.
- Call mii_phy_flowstatus() to show the flow setting.
- Match a lot of Cicada and Vitesse devices correctly.
- Add support for VSC8221, VSC8234 and VSC8641.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.2 -r1.26.10.3 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.125.6.6 -r1.125.6.7 src/sys/dev/mii/miidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:58:45 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ciphy.c miidevs

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1414:

sys/dev/mii/ciphy.c 1.34-1.37 via patch
sys/dev/mii/miidevs 1.158

- Indicate master mode if the negotiated result say so.
- Call mii_phy_flowstatus() to show the flow setting.
- Match a lot of Cicada and Vitesse devices correctly.
- Add support for VSC8221, VSC8234 and VSC8641.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.2 -r1.26.10.3 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.125.6.6 -r1.125.6.7 src/sys/dev/mii/miidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.26.10.2 src/sys/dev/mii/ciphy.c:1.26.10.3
--- src/sys/dev/mii/ciphy.c:1.26.10.2	Sun Sep  1 10:19:04 2019
+++ src/sys/dev/mii/ciphy.c	Thu Oct 24 15:58:45 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.26.10.2 2019/09/01 10:19:04 martin Exp $ */
+/* $NetBSD: ciphy.c,v 1.26.10.3 2019/10/24 15:58:45 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26.10.2 2019/09/01 10:19:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26.10.3 2019/10/24 15:58:45 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -74,35 +74,35 @@ static const struct mii_phy_funcs ciphy_
 };
 
 static const struct mii_phydesc ciphys[] = {
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8201,
-	  MII_STR_CICADA_CS8201 },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CIS8201,
+	  MII_STR_xxCICADA_CIS8201 },
 
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8201A,
-	  MII_STR_CICADA_CS8201A },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CIS8201A,
+	  MII_STR_xxCICADA_CIS8201A },
 
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8201B,
-	  MII_STR_CICADA_CS8201B },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CIS8201B,
+	  MII_STR_xxCICADA_CIS8201B },
 
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8204,
-	  MII_STR_CICADA_CS8204 },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CIS8204,
+	  MII_STR_xxCICADA_CIS8204 },
 
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_VSC8211,
-	  MII_STR_CICADA_VSC8211 },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_VSC8211,
+	  MII_STR_xxCICADA_VSC8211 },
 
-	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8244,
-	  MII_STR_CICADA_CS8244 },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_VSC8221,
+	  MII_STR_xxCICADA_VSC8221 },
 
-	{ MII_OUI_xxCICADA,		MII_MODEL_CICADA_CS8201,
-	  MII_STR_CICADA_CS8201 },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_VSC8234,
+	  MII_STR_xxCICADA_VSC8234 },
 
-	{ MII_OUI_xxCICADA,		MII_MODEL_CICADA_CS8201A,
-	  MII_STR_CICADA_CS8201A },
+	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_VSC8244,
+	  MII_STR_xxCICADA_VSC8244 },
 
-	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CS8201B,
-	  MII_STR_xxCICADA_CS8201B },
+	{ MII_OUI_xxVITESSE,		MII_MODEL_xxVITESSE_VSC8601,
+	  MII_STR_xxVITESSE_VSC8601 },
 
-	{ MII_OUI_VITESSE,		MII_MODEL_VITESSE_VSC8601,
-	  MII_STR_VITESSE_VSC8601 },
+	{ MII_OUI_xxVITESSE,		MII_MODEL_xxVITESSE_VSC8641,
+	  MII_STR_xxVITESSE_VSC8641 },
 
 	{ 0,0,
 	  NULL },
@@ -231,9 +231,8 @@ setit:
 			if ((mii->mii_ifp->if_flags & IFF_LINK0)) {
 PHY_WRITE(sc, MII_100T2CR,
 gig | GTCR_MAN_MS | GTCR_ADV_MS);
-			} else {
+			} else
 PHY_WRITE(sc, MII_100T2CR, gig | GTCR_MAN_MS);
-			}
 			break;
 		case IFM_NONE:
 			PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN);
@@ -316,7 +315,7 @@ static void
 ciphy_status(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
-	int bmsr, bmcr;
+	int bmsr, bmcr, gtsr;
 
 	mii->mii_media_status = IFM_AVALID;
 	mii->mii_media_active = IFM_ETHER;
@@ -357,20 +356,23 @@ ciphy_status(struct mii_softc *sc)
 	}
 
 	if (bmsr & CIPHY_AUXCSR_FDX)
-		mii->mii_media_active |= IFM_FDX;
+		mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc);
 	else
 		mii->mii_media_active |= IFM_HDX;
 
-	return;
+	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
+		gtsr = PHY_READ(sc, MII_100T2SR);
+		if ((gtsr & GTSR_MS_RES) != 0)
+			mii->mii_media_active |= IFM_ETH_MASTER;
+	}
 }
 
 static void
 ciphy_reset(struct mii_softc *sc)
 {
+
 	mii_phy_reset(sc);
 	DELAY(1000);
-
-	return;
 }
 
 #define PHY_SETBIT(x, y, z) \
@@ -395,9 +397,8 @@ ciphy_fixup(struct mii_softc *sc)
 	}
 
 	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);
 
@@ -406,40 +407,39 @@ ciphy_fixup(struct mii_softc *sc)
 		 * when using MII in full duplex mode.
 		 */
 		if ((speed == CIPHY_SPEED10 || speed == CIPHY_SPEED100) &&
-		(status & CIPHY_AUXCSR_FDX)) {
+		(status & 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:54:46 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: rgephy.c rgephyreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1413:

sys/dev/mii/rgephy.c1.43, 1.47, 1.49, 1.54-1.57
sys/dev/mii/rgephyreg.h 1.10, 1.12
(both via patch)

- It seems EEE support is not only on 8211F but on 8211D and newer.
- Indicate master mode if the negotiated result say so.
- Use symbolic names for chip revision.
- Cosmetic changes.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.40.10.2 -r1.40.10.3 src/sys/dev/mii/rgephy.c
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/dev/mii/rgephyreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.40.10.2 src/sys/dev/mii/rgephy.c:1.40.10.3
--- src/sys/dev/mii/rgephy.c:1.40.10.2	Mon May 13 12:40:13 2019
+++ src/sys/dev/mii/rgephy.c	Thu Oct 24 15:54:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.40.10.2 2019/05/13 12:40:13 martin Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.40.10.3 2019/10/24 15:54:46 martin Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40.10.2 2019/05/13 12:40:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40.10.3 2019/10/24 15:54:46 martin Exp $");
 
 
 /*
@@ -73,6 +73,7 @@ static int	rgephy_service(struct mii_sof
 static void	rgephy_status(struct mii_softc *);
 static int	rgephy_mii_phy_auto(struct mii_softc *);
 static void	rgephy_reset(struct mii_softc *);
+static bool	rgephy_linkup(struct mii_softc *);
 static void	rgephy_loop(struct mii_softc *);
 static void	rgephy_load_dspcode(struct mii_softc *);
 
@@ -116,13 +117,9 @@ rgephy_attach(device_t parent, device_t 
 	int rev;
 	const char *sep = "";
 
-	ma = aux;
-	mii = ma->mii_data;
-
 	rev = MII_REV(ma->mii_id2);
 	mpd = mii_phy_match(ma, rgephys);
 	aprint_naive(": Media interface\n");
-	aprint_normal(": %s, rev. %d\n", mpd->mpd_name, rev);
 
 	sc->mii_dev = self;
 	sc->mii_inst = mii->mii_instance;
@@ -130,6 +127,15 @@ rgephy_attach(device_t parent, device_t 
 	sc->mii_mpd_oui = MII_OUI(ma->mii_id1, ma->mii_id2);
 	sc->mii_mpd_model = MII_MODEL(ma->mii_id2);
 	sc->mii_mpd_rev = MII_REV(ma->mii_id2);
+
+	if (sc->mii_mpd_model == MII_MODEL_REALTEK_RTL8169S) {
+		aprint_normal(": RTL8211");
+		if (sc->mii_mpd_rev != 0)
+			aprint_normal("%c",'@' + sc->mii_mpd_rev);
+		aprint_normal(" 1000BASE-T media interface\n");
+	} else
+		aprint_normal(": %s, rev. %d\n", mpd->mpd_name, rev);
+
 	sc->mii_pdata = mii;
 	sc->mii_flags = ma->mii_flags;
 	sc->mii_anegticks = MII_ANEGTICKS_GIGE;
@@ -152,9 +158,9 @@ rgephy_attach(device_t parent, device_t 
 	 * media explicitly. Why?
 	 */
 	aprint_normal_dev(self, "");
-	if (sc->mii_capabilities & BMSR_EXTSTAT) {
+	if (sc->mii_capabilities & BMSR_EXTSTAT)
 		sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
-	}
+
 	mii_phy_add_media(sc);
 
 	/* rtl8169S does not report auto-sense; add manually.  */
@@ -257,9 +263,8 @@ rgephy_service(struct mii_softc *sc, str
 			if ((mii->mii_ifp->if_flags & IFF_LINK0)) {
 PHY_WRITE(sc, MII_100T2CR,
 gig|GTCR_MAN_MS|GTCR_ADV_MS);
-			} else {
-PHY_WRITE(sc, MII_100T2CR, gig|GTCR_MAN_MS);
-			}
+			} else
+PHY_WRITE(sc, MII_100T2CR, gig | GTCR_MAN_MS);
 			PHY_WRITE(sc, MII_BMCR, speed |
 			BMCR_AUTOEN | BMCR_STARTNEG);
 			break;
@@ -303,26 +308,9 @@ rgephy_service(struct mii_softc *sc, str
 		 * need to restart the autonegotiation process.  Read
 		 * the BMSR twice in case it's latched.
 		 */
-		if (sc->mii_mpd_rev >= 6) {
-			/* RTL8211F */
-			reg = PHY_READ(sc, RGEPHY_MII_PHYSR);
-			if (reg & RGEPHY_PHYSR_LINK) {
-sc->mii_ticks = 0;
-break;
-			}
-		} else if (sc->mii_mpd_rev >= 2) {
-			/* RTL8211B(L) */
-			reg = PHY_READ(sc, RGEPHY_MII_SSR);
-			if (reg & RGEPHY_SSR_LINK) {
-sc->mii_ticks = 0;
-break;
-			}
-		} else {
-			reg = PHY_READ(sc, RTK_GMEDIASTAT);
-			if ((reg & RTK_GMEDIASTAT_LINK) != 0) {
-sc->mii_ticks = 0;
-break;
-			}
+		if (rgephy_linkup(sc)) {
+			sc->mii_ticks = 0;
+			break;
 		}
 
 		/* Announce link loss right after it happens. */
@@ -343,7 +331,6 @@ rgephy_service(struct mii_softc *sc, str
 	/*
 	 * Callback if something changed. Note that we need to poke
 	 * the DSP on the RealTek PHYs if the media changes.
-	 *
 	 */
 	if (sc->mii_media_active != mii->mii_media_active ||
 	sc->mii_media_status != mii->mii_media_status ||
@@ -354,29 +341,41 @@ rgephy_service(struct mii_softc *sc, str
 	return 0;
 }
 
+static bool
+rgephy_linkup(struct mii_softc *sc)
+{
+	bool linkup = false;
+	u_int reg;
+
+	if (sc->mii_mpd_rev >= RGEPHY_8211F) {
+		reg = PHY_READ(sc, RGEPHY_MII_PHYSR);
+		if (reg & RGEPHY_PHYSR_LINK)
+			linkup = true;
+	} else if (sc->mii_mpd_rev >= 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-10-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 24 15:54:46 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: rgephy.c rgephyreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1413:

sys/dev/mii/rgephy.c1.43, 1.47, 1.49, 1.54-1.57
sys/dev/mii/rgephyreg.h 1.10, 1.12
(both via patch)

- It seems EEE support is not only on 8211F but on 8211D and newer.
- Indicate master mode if the negotiated result say so.
- Use symbolic names for chip revision.
- Cosmetic changes.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.40.10.2 -r1.40.10.3 src/sys/dev/mii/rgephy.c
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/dev/mii/rgephyreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  4 08:33:39 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: micphy.c

Log Message:
The gcc on this branch is not smart enough and the build breaks due to
a bogus "may be used uninitialized" warning. Initialize to zero with
XXX gcc comment (suggested by msaitoh).


To generate a diff of this commit:
cvs rdiff -u -r1.4.10.1 -r1.4.10.2 src/sys/dev/mii/micphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Sep  4 08:33:39 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: micphy.c

Log Message:
The gcc on this branch is not smart enough and the build breaks due to
a bogus "may be used uninitialized" warning. Initialize to zero with
XXX gcc comment (suggested by msaitoh).


To generate a diff of this commit:
cvs rdiff -u -r1.4.10.1 -r1.4.10.2 src/sys/dev/mii/micphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/micphy.c
diff -u src/sys/dev/mii/micphy.c:1.4.10.1 src/sys/dev/mii/micphy.c:1.4.10.2
--- src/sys/dev/mii/micphy.c:1.4.10.1	Sun Sep  1 10:14:20 2019
+++ src/sys/dev/mii/micphy.c	Wed Sep  4 08:33:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: micphy.c,v 1.4.10.1 2019/09/01 10:14:20 martin Exp $	*/
+/*	$NetBSD: micphy.c,v 1.4.10.2 2019/09/04 08:33:39 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4.10.1 2019/09/01 10:14:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4.10.2 2019/09/04 08:33:39 martin Exp $");
 
 #include "opt_mii.h"
 
@@ -158,7 +158,7 @@ micphyattach(device_t parent, device_t s
 static void
 micphy_reset(struct mii_softc *sc)
 {
-	int reg;
+	int reg = 0; /* XXX gcc */
 
 	/*
 	 * The 8081 has no "sticky bits" that survive a soft reset; several bits



CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep  1 10:19:04 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ciphy.c ciphyreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1350:

sys/dev/mii/ciphy.c 1.27-1.28, 1.30, 1.32
via patch
sys/dev/mii/ciphyreg.h  1.6

- The register bit definitions from register 0 to 15 in ciphyreg.h
  conform to the 802.3 spec, so remove them and use mii.h's definition.
  No functional change.
- Add CS8204, CS8244 VSC8211 and VSC8601 support from {Free,Open}BSD.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.5 -r1.5.20.1 src/sys/dev/mii/ciphyreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.26.10.1 src/sys/dev/mii/ciphy.c:1.26.10.2
--- src/sys/dev/mii/ciphy.c:1.26.10.1	Mon May 13 12:40:13 2019
+++ src/sys/dev/mii/ciphy.c	Sun Sep  1 10:19:04 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.26.10.1 2019/05/13 12:40:13 martin Exp $ */
+/* $NetBSD: ciphy.c,v 1.26.10.2 2019/09/01 10:19:04 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26.10.1 2019/05/13 12:40:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26.10.2 2019/09/01 10:19:04 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -83,6 +83,15 @@ static const struct mii_phydesc ciphys[]
 	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8201B,
 	  MII_STR_CICADA_CS8201B },
 
+	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8204,
+	  MII_STR_CICADA_CS8204 },
+
+	{ MII_OUI_CICADA,		MII_MODEL_CICADA_VSC8211,
+	  MII_STR_CICADA_VSC8211 },
+
+	{ MII_OUI_CICADA,		MII_MODEL_CICADA_CS8244,
+	  MII_STR_CICADA_CS8244 },
+
 	{ MII_OUI_xxCICADA,		MII_MODEL_CICADA_CS8201,
 	  MII_STR_CICADA_CS8201 },
 
@@ -92,6 +101,9 @@ static const struct mii_phydesc ciphys[]
 	{ MII_OUI_xxCICADA,		MII_MODEL_xxCICADA_CS8201B,
 	  MII_STR_xxCICADA_CS8201B },
 
+	{ MII_OUI_VITESSE,		MII_MODEL_VITESSE_VSC8601,
+	  MII_STR_VITESSE_VSC8601 },
+
 	{ 0,0,
 	  NULL },
 };
@@ -103,9 +115,9 @@ ciphymatch(device_t parent, cfdata_t mat
 	struct mii_attach_args *ma = aux;
 
 	if (mii_phy_match(ma, ciphys) != NULL)
-		return (10);
+		return 10;
 
-	return (0);
+	return 0;
 }
 
 static void
@@ -151,11 +163,9 @@ ciphy_service(struct mii_softc *sc, stru
 
 	switch (cmd) {
 	case MII_POLLSTAT:
-		/*
-		 * If we're not polling our PHY instance, just return.
-		 */
+		/* If we're not polling our PHY instance, just return. */
 		if (IFM_INST(ife->ifm_media) != sc->mii_inst)
-			return (0);
+			return 0;
 		break;
 
 	case MII_MEDIACHG:
@@ -166,12 +176,10 @@ ciphy_service(struct mii_softc *sc, stru
 		if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
 			reg = PHY_READ(sc, MII_BMCR);
 			PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
-			return (0);
+			return 0;
 		}
 
-		/*
-		 * If the interface is not up, don't do anything.
-		 */
+		/* If the interface is not up, don't do anything. */
 		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
 			break;
 
@@ -180,40 +188,37 @@ ciphy_service(struct mii_softc *sc, stru
 		switch (IFM_SUBTYPE(ife->ifm_media)) {
 		case IFM_AUTO:
 #ifdef foo
-			/*
-			 * If we're already in auto mode, just return.
-			 */
-			if (PHY_READ(sc, CIPHY_MII_BMCR) & CIPHY_BMCR_AUTOEN)
-return (0);
+			/* If we're already in auto mode, just return. */
+			if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
+return 0;
 #endif
 			(void) mii_phy_auto(sc, 0);
 			break;
 		case IFM_1000_T:
-			speed = CIPHY_S1000;
+			speed = BMCR_S1000;
 			goto setit;
 		case IFM_100_TX:
-			speed = CIPHY_S100;
+			speed = BMCR_S100;
 			goto setit;
 		case IFM_10_T:
-			speed = CIPHY_S10;
+			speed = BMCR_S10;
 setit:
 			if ((ife->ifm_media & IFM_FDX) != 0) {
-speed |= CIPHY_BMCR_FDX;
-gig = CIPHY_1000CTL_AFD;
-			} else {
-gig = CIPHY_1000CTL_AHD;
-			}
-
-			PHY_WRITE(sc, CIPHY_MII_1000CTL, 0);
-			PHY_WRITE(sc, CIPHY_MII_BMCR, speed);
-			PHY_WRITE(sc, CIPHY_MII_ANAR, CIPHY_SEL_TYPE);
+speed |= BMCR_FDX;
+gig = GTCR_ADV_1000TFDX;
+			} else
+gig = GTCR_ADV_1000THDX;
+
+			PHY_WRITE(sc, MII_100T2CR, 0);
+			PHY_WRITE(sc, MII_BMCR, speed);
+			PHY_WRITE(sc, MII_ANAR, ANAR_CSMA);
 
 			if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)
 break;
 
-			PHY_WRITE(sc, CIPHY_MII_1000CTL, gig);
-			PHY_WRITE(sc, CIPHY_MII_BMCR,
-			speed|CIPHY_BMCR_AUTOEN|CIPHY_BMCR_STARTNEG);
+			PHY_WRITE(sc, MII_100T2CR, gig);
+			PHY_WRITE(sc, MII_BMCR,
+			speed | BMCR_AUTOEN | BMCR_STARTNEG);
 
 			/*
 			 * When setting the link manually, one side must
@@ -224,38 +229,31 @@ setit:
 			 * be a master, otherwise it's a slave.
 			 */
 			if ((mii->mii_ifp->if_flags & 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep  1 10:19:04 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ciphy.c ciphyreg.h

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1350:

sys/dev/mii/ciphy.c 1.27-1.28, 1.30, 1.32
via patch
sys/dev/mii/ciphyreg.h  1.6

- The register bit definitions from register 0 to 15 in ciphyreg.h
  conform to the 802.3 spec, so remove them and use mii.h's definition.
  No functional change.
- Add CS8204, CS8244 VSC8211 and VSC8601 support from {Free,Open}BSD.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.5 -r1.5.20.1 src/sys/dev/mii/ciphyreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep  1 10:14:20 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: micphy.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1349:

sys/dev/mii/micphy.c1.6 via patch

Add KSZ8081 support from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/dev/mii/micphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/micphy.c
diff -u src/sys/dev/mii/micphy.c:1.4 src/sys/dev/mii/micphy.c:1.4.10.1
--- src/sys/dev/mii/micphy.c:1.4	Thu Jul  7 06:55:41 2016
+++ src/sys/dev/mii/micphy.c	Sun Sep  1 10:14:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $	*/
+/*	$NetBSD: micphy.c,v 1.4.10.1 2019/09/01 10:14:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4.10.1 2019/09/01 10:14:20 martin Exp $");
 
 #include "opt_mii.h"
 
@@ -79,6 +79,8 @@ __KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1
 
 static int	micphymatch(device_t, cfdata_t, void *);
 static void	micphyattach(device_t, device_t, void *);
+static void	micphy_reset(struct mii_softc *);
+static int	micphy_service(struct mii_softc *, struct mii_data *, int);
 
 CFATTACH_DECL3_NEW(micphy, sizeof(struct mii_softc),
 micphymatch, micphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
@@ -88,10 +90,13 @@ static int	micphy_service(struct mii_sof
 static void	micphy_fixup(struct mii_softc *, int, int, device_t);
 
 static const struct mii_phy_funcs micphy_funcs = {
-	micphy_service, ukphy_status, mii_phy_reset,
+	micphy_service, ukphy_status, micphy_reset,
 };
 
 static const struct mii_phydesc micphys[] = {
+	{ MII_OUI_MICREL,		MII_MODEL_MICREL_KSZ8081,
+	  MII_STR_MICREL_KSZ8081 },
+
 	{ MII_OUI_MICREL,		MII_MODEL_MICREL_KSZ9021RNI,
 	  MII_STR_MICREL_KSZ9021RNI },
 
@@ -99,6 +104,8 @@ static const struct mii_phydesc micphys[
 	  NULL },
 };
 
+#define	MII_KSZ8081_PHYCTL2			0x1f
+
 static int
 micphymatch(device_t parent, cfdata_t match, void *aux)
 {
@@ -148,6 +155,24 @@ micphyattach(device_t parent, device_t s
 	aprint_normal("\n");
 }
 
+static void
+micphy_reset(struct mii_softc *sc)
+{
+	int reg;
+
+	/*
+	 * The 8081 has no "sticky bits" that survive a soft reset; several bits
+	 * in the Phy Control Register 2 must be preserved across the reset.
+	 * These bits are set up by the bootloader; they control how the phy
+	 * interfaces to the board (such as clock frequency and LED behavior).
+	 */
+	if (sc->mii_mpd_model == MII_MODEL_MICREL_KSZ8081)
+		reg = PHY_READ(sc, MII_KSZ8081_PHYCTL2);
+	mii_phy_reset(sc);
+	if (sc->mii_mpd_model == MII_MODEL_MICREL_KSZ8081)
+		PHY_WRITE(sc, MII_KSZ8081_PHYCTL2, reg);
+}
+
 static int
 micphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
 {



CVS commit: [netbsd-8] src/sys/dev/mii

2019-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep  1 10:14:20 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: micphy.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1349:

sys/dev/mii/micphy.c1.6 via patch

Add KSZ8081 support from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/dev/mii/micphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 15:48:15 UTC 2019

Added Files:
src/sys/dev/mii [netbsd-8]: makphyvar.h

Log Message:
Add missing file from last pullup (ticket #1316, revisions 1.1-1.2)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.2.8.2 src/sys/dev/mii/makphyvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/dev/mii/makphyvar.h
diff -u /dev/null src/sys/dev/mii/makphyvar.h:1.2.8.2
--- /dev/null	Thu Aug  1 15:48:15 2019
+++ src/sys/dev/mii/makphyvar.h	Thu Aug  1 15:48:15 2019
@@ -0,0 +1,42 @@
+/* $NetBSD: makphyvar.h,v 1.2.8.2 2019/08/01 15:48:15 martin Exp $ */
+
+/*-
+ * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Masanobu SAITOH.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MII_MAKPHYVAR_H_
+#define _MII_MAKPHYVAR_H_
+
+struct makphy_softc {
+	struct mii_softc sc_mii;
+	uint32_t sc_flags;
+};
+
+#define MAKPHY_F_I210	__BIT(0)	/* Identify I210 (mii_model == 0) */
+
+#endif /* _MII_MAKPHYVAR_H_ */



CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 15:48:15 UTC 2019

Added Files:
src/sys/dev/mii [netbsd-8]: makphyvar.h

Log Message:
Add missing file from last pullup (ticket #1316, revisions 1.1-1.2)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.2.8.2 src/sys/dev/mii/makphyvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:27:30 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ihphy.c makphy.c

Log Message:
Pull up the following revision, requested by msaitoh in ticket #1316:

sys/dev/mii/makphy.c1.54,1.57-1.60 via patch
sys/dev/mii/makphyvar.h 1.1-1.2
sys/dev/mii/ihphy.c 1.12,1.14 via patch

- Support Intel I21[01].
- 88E1000(S) has no page select register, so don't access it.
  Note that qemu doesn't implement the register and the access fails.
- Check the result of the ESSR register access because Qemu doesn't
  implement the register.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/dev/mii/ihphy.c
cvs rdiff -u -r1.42.8.2 -r1.42.8.3 src/sys/dev/mii/makphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:27:30 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: ihphy.c makphy.c

Log Message:
Pull up the following revision, requested by msaitoh in ticket #1316:

sys/dev/mii/makphy.c1.54,1.57-1.60 via patch
sys/dev/mii/makphyvar.h 1.1-1.2
sys/dev/mii/ihphy.c 1.12,1.14 via patch

- Support Intel I21[01].
- 88E1000(S) has no page select register, so don't access it.
  Note that qemu doesn't implement the register and the access fails.
- Check the result of the ESSR register access because Qemu doesn't
  implement the register.
- KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/dev/mii/ihphy.c
cvs rdiff -u -r1.42.8.2 -r1.42.8.3 src/sys/dev/mii/makphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/ihphy.c
diff -u src/sys/dev/mii/ihphy.c:1.10 src/sys/dev/mii/ihphy.c:1.10.8.1
--- src/sys/dev/mii/ihphy.c:1.10	Wed Nov  2 07:01:54 2016
+++ src/sys/dev/mii/ihphy.c	Thu Aug  1 14:27:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ihphy.c,v 1.10 2016/11/02 07:01:54 msaitoh Exp $	*/
+/*	$NetBSD: ihphy.c,v 1.10.8.1 2019/08/01 14:27:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.10 2016/11/02 07:01:54 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.10.8.1 2019/08/01 14:27:30 martin Exp $");
 
 #include 
 #include 
@@ -100,6 +100,10 @@ static const struct mii_phydesc ihphys[]
 	  MII_STR_INTEL_I82579 },
 	{ MII_OUI_INTEL,		MII_MODEL_INTEL_I217,
 	  MII_STR_INTEL_I217 },
+	{ MII_OUI_INTEL,		MII_MODEL_INTEL_I82580,
+	  MII_STR_INTEL_I82580},
+	{ MII_OUI_INTEL,		MII_MODEL_INTEL_I350,
+	  MII_STR_INTEL_I350},
 
 	{ 0,0,
 	  NULL },
@@ -153,9 +157,7 @@ ihphyattach(device_t parent, device_t se
 		mii_phy_add_media(sc);
 	aprint_normal("\n");
 
-	/*
-	 * Link setup (as done by Intel's Linux driver for the 82577).
-	 */
+	/* Link setup (as done by Intel's Linux driver for the 82577). */
 	reg = PHY_READ(sc, IHPHY_MII_CFG);
 	reg |= IHPHY_CFG_TX_CRS;
 	reg |= IHPHY_CFG_DOWN_SHIFT;
@@ -170,9 +172,7 @@ ihphy_service(struct mii_softc *sc, stru
 
 	switch (cmd) {
 	case MII_POLLSTAT:
-		/*
-		 * If we're not polling our PHY instance, just return.
-		 */
+		/* If we're not polling our PHY instance, just return. */
 		if (IFM_INST(ife->ifm_media) != sc->mii_inst)
 			return 0;
 		break;
@@ -188,15 +188,11 @@ ihphy_service(struct mii_softc *sc, stru
 			return 0;
 		}
 
-		/*
-		 * If the interface is not up, don't do anything.
-		 */
+		/* If the interface is not up, don't do anything. */
 		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
 			break;
 
-		/*
-		 * If media is deselected, disable link (standby).
-		 */
+		/* If media is deselected, disable link (standby). */
 		reg = PHY_READ(sc, IHPHY_MII_ECR);
 		if (IFM_SUBTYPE(ife->ifm_media) == IFM_NONE)
 			reg &= ~IHPHY_ECR_LNK_EN;
@@ -204,17 +200,13 @@ ihphy_service(struct mii_softc *sc, stru
 			reg |= IHPHY_ECR_LNK_EN;
 		PHY_WRITE(sc, IHPHY_MII_ECR, reg);
 
-		/*
-		 * XXX Adjust MDI/MDIX configuration?  Other settings?
-		 */
+		/* XXX Adjust MDI/MDIX configuration?  Other settings? */
 
 		mii_phy_setmedia(sc);
 		break;
 
 	case MII_TICK:
-		/*
-		 * If we're not currently selected, just return.
-		 */
+		/* If we're not currently selected, just return. */
 		if (IFM_INST(ife->ifm_media) != sc->mii_inst)
 			return 0;
 

Index: src/sys/dev/mii/makphy.c
diff -u src/sys/dev/mii/makphy.c:1.42.8.2 src/sys/dev/mii/makphy.c:1.42.8.3
--- src/sys/dev/mii/makphy.c:1.42.8.2	Thu Mar  7 17:19:38 2019
+++ src/sys/dev/mii/makphy.c	Thu Aug  1 14:27:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: makphy.c,v 1.42.8.2 2019/03/07 17:19:38 martin Exp $	*/
+/*	$NetBSD: makphy.c,v 1.42.8.3 2019/08/01 14:27:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.42.8.2 2019/03/07 17:19:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.42.8.3 2019/08/01 14:27:30 martin Exp $");
 
 #include 
 #include 
@@ -76,11 +76,12 @@ __KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1
 #include 
 
 #include 
+#include 
 
 static int	makphymatch(device_t, cfdata_t, void *);
 static void	makphyattach(device_t, device_t, void *);
 
-CFATTACH_DECL_NEW(makphy, sizeof(struct mii_softc),
+CFATTACH_DECL_NEW(makphy, sizeof(struct makphy_softc),
 makphymatch, makphyattach, mii_phy_detach, mii_phy_activate);
 
 static int	makphy_service(struct mii_softc *, struct mii_data *, int);
@@ -168,15 +169,30 @@ static const struct mii_phydesc makphys[
 #define MAKARG_PDOWN	true	/* Power DOWN */
 #define MAKARG_PUP	false	/* Power UP */
 
+static bool
+makphy_isi210(device_t parent, struct 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:24:21 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
regen for ticket #1315


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.5 -r1.128.6.6 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.5 -r1.116.6.6 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.128.6.5 src/sys/dev/mii/miidevs.h:1.128.6.6
--- src/sys/dev/mii/miidevs.h:1.128.6.5	Thu Mar  7 17:17:09 2019
+++ src/sys/dev/mii/miidevs.h	Thu Aug  1 14:24:21 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.128.6.5 2019/03/07 17:17:09 martin Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.128.6.6 2019/08/01 14:24:21 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.125.6.5 2019/03/07 17:16:40 martin Exp
+ *	NetBSD: miidevs,v 1.125.6.6 2019/08/01 14:22:55 martin Exp
  */
 
 /*-
@@ -62,6 +62,8 @@
 #define	MII_OUI_DATATRACK	0x0002c6	/* Data Track Technology */
 #define	MII_OUI_CICADA	0x0003f1	/* Cicada Semiconductor */
 #define	MII_OUI_AGERE	0x00053d	/* Agere */
+#define	MII_OUI_BANKSPEED	0x0006b8	/* Bankspeed Pty */
+#define	MII_OUI_NETEXCELL	0x0008bb	/* NetExcell */
 #define	MII_OUI_NETAS	0x0009c3	/* Netas */
 #define	MII_OUI_BROADCOM2	0x000af7	/* Broadcom Corporation */
 #define	MII_OUI_RALINK	0x000c43	/* Ralink Technology */
@@ -78,6 +80,7 @@
 #define	MII_OUI_VIA	0x004063	/* VIA Technologies */
 #define	MII_OUI_MARVELL	0x005043	/* Marvell Semiconductor */
 #define	MII_OUI_QUALSEMI	0x006051	/* Quality Semiconductor */
+#define	MII_OUI_AMLOGIC	0x006051	/* Amlogic */
 #define	MII_OUI_DAVICOM	0x00606e	/* Davicom Semiconductor */
 #define	MII_OUI_SMSC	0x00800f	/* SMSC */
 #define	MII_OUI_ICPLUS	0x0090c3	/* IC Plus Corp. */
@@ -98,35 +101,29 @@
 #define	MII_OUI_TI	0x080028	/* Texas Instruments */
 #define	MII_OUI_BROADCOM4	0x18c086	/* Broadcom Corporation */
 
-/* Some Intel 82553's use an alternative OUI. */
-#define	MII_OUI_xxINTEL	0x001f00	/* Intel */
-
-/* Some VIA 6122's use an alternative OUI. */
-#define	MII_OUI_xxCICADA	0x00c08f	/* Cicada Semiconductor */
-
-/* bad bitorder (bits "g" and "h" (= MSBs byte 1) lost) */
+/* Unregisterd or wrong OUI */
+#define	MII_OUI_yyREALTEK	0x04	/* Realtek */
 #define	MII_OUI_yyAMD	0x58	/* Advanced Micro Devices */
+#define	MII_OUI_xxMYSON	0x00032d	/* Myson Technology */
+#define	MII_OUI_xxTSC	0x00039c	/* TDK Semiconductor */
+#define	MII_OUI_xxASIX	0x000674	/* Asix Semiconductor */
+#define	MII_OUI_xxDAVICOM	0x000676	/* Davicom Semiconductor */
+#define	MII_OUI_xxAMLOGIC	0x00068a	/* Amlogic */
+#define	MII_OUI_xxQUALSEMI	0x00068a	/* Quality Semiconductor */
+#define	MII_OUI_xxREALTEK	0x000732	/* Realtek */
 #define	MII_OUI_xxBROADCOM	0x000818	/* Broadcom Corporation */
+#define	MII_OUI_xxPMCSIERRA	0x0009c0	/* PMC-Sierra */
+#define	MII_OUI_xxMARVELL	0x000ac2	/* Marvell Semiconductor */
+#define	MII_OUI_xxINTEL	0x001f00	/* Intel */
 #define	MII_OUI_xxBROADCOM_ALT1	0x0050ef	/* Broadcom Corporation */
-#define	MII_OUI_xxDAVICOM	0x000676	/* Davicom Semiconductor */
 #define	MII_OUI_yyINTEL	0x005500	/* Intel */
-#define	MII_OUI_xxMARVELL	0x000ac2	/* Marvell Semiconductor */
-#define	MII_OUI_xxMYSON	0x00032d	/* Myson Technology */
+#define	MII_OUI_yyASIX	0x007063	/* Asix Semiconductor */
+#define	MII_OUI_xxPMCSIERRA2	0x009057	/* PMC-Sierra */
+#define	MII_OUI_xxCICADA	0x00c08f	/* Cicada Semiconductor */
 #define	MII_OUI_xxNATSEMI	0x1000e8	/* National Semiconductor */
-#define	MII_OUI_xxQUALSEMI	0x00068a	/* Quality Semiconductor */
-#define	MII_OUI_xxTSC	0x00039c	/* TDK Semiconductor */
-
-/* bad byteorder (bits "q" and "r" (= LSBs byte 3) lost) */
 #define	MII_OUI_xxLEVEL1	0x782000	/* Level 1 */
 #define	MII_OUI_xxXAQTI	0xace000	/* XaQti Corp. */
 
-/* Don't know what's going on here. */
-#define	MII_OUI_xxASIX	0x000674	/* Asix Semiconductor */
-#define	MII_OUI_xxPMCSIERRA	0x0009c0	/* PMC-Sierra */
-#define	MII_OUI_xxPMCSIERRA2	0x009057	/* PMC-Sierra */
-
-#define	MII_OUI_xxREALTEK	0x000732	/* Realtek */
-#define	MII_OUI_yyREALTEK	0x04	/* Realtek */
 /*
  * List of known models.  Grouped by oui.
  */
@@ -140,6 +137,12 @@
 /* Asix semiconductor PHYs */
 #define	MII_MODEL_xxASIX_AX88X9X	0x0031
 #define	MII_STR_xxASIX_AX88X9X	"Ax88x9x internal PHY"
+#define	MII_MODEL_yyASIX_AX88772	0x0001
+#define	MII_STR_yyASIX_AX88772	"AX88772 internal PHY"
+#define	MII_MODEL_yyASIX_AX88772A	0x0006
+#define	MII_STR_yyASIX_AX88772A	"AX88772A internal PHY"
+#define	MII_MODEL_yyASIX_AX88772B	0x0008
+#define	MII_STR_yyASIX_AX88772B	"AX88772B internal PHY"
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -155,6 +158,12 @@
 #define	MII_MODEL_ALTIMA_Am79C874	0x0021
 #define	MII_STR_ALTIMA_Am79C874	"Am79C874 10/100 media interface"
 
+/* 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:24:21 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
regen for ticket #1315


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.5 -r1.128.6.6 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.5 -r1.116.6.6 src/sys/dev/mii/miidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:22:55 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1315):

sys/dev/mii/miidevs: revision 1.151
sys/dev/mii/miidevs: revision 1.152
sys/dev/mii/miidevs: revision 1.153
sys/dev/mii/miidevs: revision 1.145
sys/dev/mii/miidevs: revision 1.146
sys/dev/mii/miidevs: revision 1.147
sys/dev/mii/miidevs: revision 1.148
sys/dev/mii/miidevs: revision 1.149
sys/dev/mii/miidevs: revision 1.150

 Add SMSC(Microchip) LAN911X and LAN75XX.

 Fix I82578 OUI. This change only affects to MIIVERBOSE.
See also if_wm.c rev. 1.599.

 Cleanup xx or yy OUIs. Sort by number.

 Add yyASIX and AX88772* devices.

 Add Davicom DM9161, DM9161[ABC] and DM9601.

 Remove extra space.

 Add Bankspeed Pty and NetExcell.

Add Amlogix GXL internal PHY

Add ID for the Broadcom BCM53125 1000BASE-T switch.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.5 -r1.125.6.6 src/sys/dev/mii/miidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.125.6.5 src/sys/dev/mii/miidevs:1.125.6.6
--- src/sys/dev/mii/miidevs:1.125.6.5	Thu Mar  7 17:16:40 2019
+++ src/sys/dev/mii/miidevs	Thu Aug  1 14:22:55 2019
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.125.6.5 2019/03/07 17:16:40 martin Exp $
+$NetBSD: miidevs,v 1.125.6.6 2019/08/01 14:22:55 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -55,6 +55,8 @@ 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
 oui NETAS			0x0009c3	Netas
 oui BROADCOM2			0x000af7	Broadcom Corporation
 oui RALINK			0x000c43	Ralink Technology
@@ -71,6 +73,7 @@ oui LEVEL1			0x00207b	Level 1
 oui VIA0x004063	VIA Technologies
 oui MARVELL			0x005043	Marvell Semiconductor
 oui QUALSEMI			0x006051	Quality Semiconductor
+oui AMLOGIC			0x006051	Amlogic
 oui DAVICOM			0x00606e	Davicom Semiconductor
 oui SMSC			0x00800f	SMSC
 oui ICPLUS			0x0090c3	IC Plus Corp.
@@ -91,35 +94,29 @@ oui NATSEMI			0x080017	National Semicond
 oui TI0x080028	Texas Instruments
 oui BROADCOM4			0x18c086	Broadcom Corporation
 
-/* Some Intel 82553's use an alternative OUI. */
-oui xxINTEL			0x001f00	Intel
-
-/* Some VIA 6122's use an alternative OUI. */
-oui xxCICADA			0x00c08f	Cicada Semiconductor
-
-/* bad bitorder (bits "g" and "h" (= MSBs byte 1) lost) */
+/* Unregisterd or wrong OUI */
+oui yyREALTEK			0x04	Realtek
 oui yyAMD			0x58	Advanced Micro Devices
+oui xxMYSON			0x00032d	Myson Technology
+oui xxTSC			0x00039c	TDK Semiconductor
+oui xxASIX			0x000674	Asix Semiconductor
+oui xxDAVICOM			0x000676	Davicom Semiconductor
+oui xxAMLOGIC			0x00068a	Amlogic
+oui xxQUALSEMI			0x00068a	Quality Semiconductor
+oui xxREALTEK			0x000732	Realtek
 oui xxBROADCOM			0x000818	Broadcom Corporation
+oui xxPMCSIERRA			0x0009c0	PMC-Sierra
+oui xxMARVELL			0x000ac2	Marvell Semiconductor
+oui xxINTEL			0x001f00	Intel
 oui xxBROADCOM_ALT1		0x0050ef	Broadcom Corporation
-oui xxDAVICOM			0x000676	Davicom Semiconductor
 oui yyINTEL			0x005500	Intel
-oui xxMARVELL			0x000ac2	Marvell Semiconductor
-oui xxMYSON			0x00032d	Myson Technology
+oui yyASIX			0x007063	Asix Semiconductor
+oui xxPMCSIERRA2		0x009057	PMC-Sierra
+oui xxCICADA			0x00c08f	Cicada Semiconductor
 oui xxNATSEMI			0x1000e8	National Semiconductor
-oui xxQUALSEMI			0x00068a	Quality Semiconductor
-oui xxTSC			0x00039c	TDK Semiconductor
-
-/* bad byteorder (bits "q" and "r" (= LSBs byte 3) lost) */
 oui xxLEVEL1			0x782000	Level 1
 oui xxXAQTI			0xace000	XaQti Corp.
 
-/* Don't know what's going on here. */
-oui xxASIX			0x000674	Asix Semiconductor
-oui xxPMCSIERRA			0x0009c0	PMC-Sierra
-oui xxPMCSIERRA2		0x009057	PMC-Sierra
-
-oui xxREALTEK			0x000732	Realtek
-oui yyREALTEK			0x04	Realtek
 /*
  * List of known models.  Grouped by oui.
  */
@@ -131,6 +128,9 @@ model AGERE ET1011		0x0004 Agere ET1011 
 
 /* Asix semiconductor PHYs */
 model xxASIX AX88X9X		0x0031 Ax88x9x internal PHY
+model yyASIX AX88772		0x0001 AX88772 internal PHY
+model yyASIX AX88772A		0x0006 AX88772A internal PHY
+model yyASIX AX88772B		0x0008 AX88772B internal PHY
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -141,6 +141,10 @@ model ALTIMA AC101		0x0021 AC101 10/100 
 model ALTIMA Am79C875		0x0014 Am79C875 10/100 media interface
 model ALTIMA Am79C874		0x0021 Am79C874 10/100 media interface
 
+/* Amlogic PHYs */
+model AMLOGIC GXL		0x Meson GXL internal PHY
+model xxAMLOGIC GXL		0x Meson GXL internal PHY
+
 /* Atheros PHYs */
 model ATHEROS F1		0x0001 F1 10/100/1000 PHY
 model ATHEROS F2		0x0002 F2 

CVS commit: [netbsd-8] src/sys/dev/mii

2019-08-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug  1 14:22:55 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1315):

sys/dev/mii/miidevs: revision 1.151
sys/dev/mii/miidevs: revision 1.152
sys/dev/mii/miidevs: revision 1.153
sys/dev/mii/miidevs: revision 1.145
sys/dev/mii/miidevs: revision 1.146
sys/dev/mii/miidevs: revision 1.147
sys/dev/mii/miidevs: revision 1.148
sys/dev/mii/miidevs: revision 1.149
sys/dev/mii/miidevs: revision 1.150

 Add SMSC(Microchip) LAN911X and LAN75XX.

 Fix I82578 OUI. This change only affects to MIIVERBOSE.
See also if_wm.c rev. 1.599.

 Cleanup xx or yy OUIs. Sort by number.

 Add yyASIX and AX88772* devices.

 Add Davicom DM9161, DM9161[ABC] and DM9601.

 Remove extra space.

 Add Bankspeed Pty and NetExcell.

Add Amlogix GXL internal PHY

Add ID for the Broadcom BCM53125 1000BASE-T switch.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.5 -r1.125.6.6 src/sys/dev/mii/miidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.