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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:25:16 UTC 2024

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

Log Message:
Regen for ticket #712


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.10.1 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.155 -r1.155.10.1 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.166 src/sys/dev/mii/miidevs.h:1.166.10.1
--- src/sys/dev/mii/miidevs.h:1.166	Tue Jun 29 21:04:02 2021
+++ src/sys/dev/mii/miidevs.h	Thu Jun 20 18:25:16 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.166 2021/06/29 21:04:02 pgoyette Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.166.10.1 2024/06/20 18:25:16 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp
+ *	NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp
  */
 
 /*-
@@ -99,6 +99,8 @@
 #define	MII_OUI_TI	0x080028		/* Texas Instruments */
 #define	MII_OUI_BROADCOM4	0x18c086		/* Broadcom Corporation */
 #define	MII_OUI_RENESAS	0x749050		/* Renesas */
+#define	MII_OUI_INTEL2	0x984fee		/* Intel */
+#define	MII_OUI_MAXLINEAR	0xac9a96		/* MaxLinear */
 
 /* Unregistered or wrong OUI */
 #define	MII_OUI_yyREALTEK	0x04		/* Realtek */
@@ -123,6 +125,7 @@
 #define	MII_OUI_xxPMCSIERRA2	0x009057		/* PMC-Sierra */
 #define	MII_OUI_xxCICADA	0x00c08f		/* Cicada Semiconductor */
 #define	MII_OUI_xxRDC	0x00d02d		/* RDC Semiconductor */
+#define	MII_OUI_xxMAXLINEAR	0x0c32ab		/* MaxLinear */
 #define	MII_OUI_xxNATSEMI	0x1000e8		/* National Semiconductor */
 #define	MII_OUI_xxLEVEL1	0x782000		/* Level 1 */
 #define	MII_OUI_xxXAQTI	0xace000		/* XaQti Corp. */
@@ -405,7 +408,17 @@
 #define	MII_STR_xxMARVELL_I82563	"i82563 10/100/1000 media interface"
 #define	MII_MODEL_ATTANSIC_I82578	0x0004		/* Intel 82578 10/100/1000 media interface */
 #define	MII_STR_ATTANSIC_I82578	"Intel 82578 10/100/1000 media interface"
-
+/* Acquired by MaxLinear */
+#define	MII_MODEL_INTEL2_GPY211	0x		/* MaxLinear GPY21[125] 2.5G media interface */
+#define	MII_STR_INTEL2_GPY211	"MaxLinear GPY21[125] 2.5G media interface"
+#define	MII_MODEL_INTEL2_I226_1	0x0001		/* I226 2.5G media interface (1) */
+#define	MII_STR_INTEL2_I226_1	"I226 2.5G media interface (1)"
+#define	MII_MODEL_INTEL2_I226_2	0x0005		/* I226 2.5G media interface (2) */
+#define	MII_STR_INTEL2_I226_2	"I226 2.5G media interface (2)"
+#define	MII_MODEL_INTEL2_I225	0x000c		/* I225 2.5G media interface */
+#define	MII_STR_INTEL2_I225	"I225 2.5G media interface"
+#define	MII_MODEL_INTEL2_GPY115	0x0030		/* MaxLinear GPY115 Gigabit PHY */
+#define	MII_STR_INTEL2_GPY115	"MaxLinear GPY115 Gigabit PHY"
 
 /* JMicron PHYs */
 #define	MII_MODEL_JMICRON_JMP211	0x0021		/* JMP211 10/100/1000 media interface */

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.155 src/sys/dev/mii/miidevs_data.h:1.155.10.1
--- src/sys/dev/mii/miidevs_data.h:1.155	Tue Jun 29 21:04:02 2021
+++ src/sys/dev/mii/miidevs_data.h	Thu Jun 20 18:25:16 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.155 2021/06/29 21:04:02 pgoyette Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.155.10.1 2024/06/20 18:25:16 martin Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp
+ *	NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp
  */
 
 /*-
@@ -81,28 +81,31 @@ static const uint32_t mii_vendors[] = {
 	MII_OUI_TI, 393, 399, 0,
 	MII_OUI_BROADCOM4, 109, 118, 0,
 	MII_OUI_RENESAS, 411, 0,
-	MII_OUI_yyREALTEK, 419, 0,
+	MII_OUI_INTEL2, 305, 0,
+	MII_OUI_MAXLINEAR, 419, 0,
+	MII_OUI_yyREALTEK, 429, 0,
 	MII_OUI_yyAMD, 1, 10, 16, 0,
-	MII_OUI_xxVIA, 427, 66, 0,
+	MII_OUI_xxVIA, 437, 66, 0,
 	MII_OUI_xxMYSON, 315, 43, 0,
 	MII_OUI_xxTSC, 311, 186, 0,
-	MII_OUI_xxASIX, 431, 186, 0,
+	MII_OUI_xxASIX, 441, 186, 0,
 	MII_OUI_xxDAVICOM, 260, 186, 0,
 	MII_OUI_xxAMLOGIC, 252, 0,
 	MII_OUI_xxQUALSEMI, 244, 186, 0,
-	MII_OUI_xxREALTEK, 419, 0,
+	MII_OUI_xxREALTEK, 429, 0,
 	MII_OUI_xxBROADCOM, 109, 118, 0,
 	MII_OUI_xxPMCSIERRA, 338, 0,
-	MII_OUI_xxICPLUS, 436, 439, 378, 0,
+	MII_OUI_xxICPLUS, 446, 449, 378, 0,
 	MII_OUI_xxMARVELL, 236, 186, 0,
 	MII_OUI_xxINTEL, 305, 0,
 	MII_OUI_xxBROADCOM_ALT1, 109, 118, 0,
 	MII_OUI_yyINTEL, 305, 0,
-	MII_OUI_yyASIX, 431, 186, 0,
-	MII_OUI_xxVITESSE, 444, 186, 0,
+	MII_OUI_yyASIX, 441, 186, 0,
+	MII_OUI_xxVITESSE, 454, 186, 0,
 	MII_OUI_xxPMCSIERRA2, 338, 0,
-	MII_OUI_xxCICADA, 452, 186, 0,
-	MII_OUI_xxRDC, 459, 186, 0,
+	MII_OUI_xxCICADA, 462, 186, 0,
+	MII_OUI_xxRDC, 469, 186, 0,
+	MII_OUI_xxMAXLINEAR, 419

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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:25:16 UTC 2024

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

Log Message:
Regen for ticket #712


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.10.1 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.155 -r1.155.10.1 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-10] src/sys/dev/mii

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:24:44 UTC 2024

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

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

sys/dev/mii/miidevs: revision 1.170
sys/dev/mii/miidevs: revision 1.171
sys/dev/mii/miidevs: revision 1.169

Add MaxLinear GPY21[125] 2.5G PHY.

miidevs: Update I22[56]
 - Add model 0x0001 and 0x0005 for I226 and 0x000c for I225.
   Need more info to write better descriptions.
 - Modify GPY211's description a little.

miidevs: Add MaxLinear GPY115.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.168.20.1 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.168 src/sys/dev/mii/miidevs:1.168.20.1
--- src/sys/dev/mii/miidevs:1.168	Tue Jun 23 14:35:36 2020
+++ src/sys/dev/mii/miidevs	Thu Jun 20 18:24:44 2024
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.168 2020/06/23 14:35:36 msaitoh Exp $
+$NetBSD: miidevs,v 1.168.20.1 2024/06/20 18:24:44 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -92,6 +92,8 @@ oui NATSEMI			0x080017	National Semicond
 oui TI0x080028	Texas Instruments
 oui BROADCOM4			0x18c086	Broadcom Corporation
 oui RENESAS			0x749050	Renesas
+oui INTEL2			0x984fee	Intel
+oui MAXLINEAR			0xac9a96	MaxLinear
 
 /* Unregistered or wrong OUI */
 oui yyREALTEK			0x04	Realtek
@@ -116,6 +118,7 @@ oui xxVITESSE			0x008083	Vitesse Semicon
 oui xxPMCSIERRA2		0x009057	PMC-Sierra
 oui xxCICADA			0x00c08f	Cicada Semiconductor
 oui xxRDC			0x00d02d	RDC Semiconductor
+oui xxMAXLINEAR			0x0c32ab	MaxLinear
 oui xxNATSEMI			0x1000e8	National Semiconductor
 oui xxLEVEL1			0x782000	Level 1
 oui xxXAQTI			0xace000	XaQti Corp.
@@ -276,7 +279,12 @@ model INTEL I350		0x003b I350 10/100/100
 model xxMARVELL I210		0x I210 10/100/1000 media interface
 model xxMARVELL I82563		0x000a i82563 10/100/1000 media interface
 model ATTANSIC I82578		0x0004 Intel 82578 10/100/1000 media interface
-
+/* Acquired by MaxLinear */
+model INTEL2 GPY211		0x MaxLinear GPY21[125] 2.5G media interface
+model INTEL2 I226_1		0x0001 I226 2.5G media interface (1)
+model INTEL2 I226_2		0x0005 I226 2.5G media interface (2)
+model INTEL2 I225		0x000c I225 2.5G media interface
+model INTEL2 GPY115		0x0030 MaxLinear GPY115 Gigabit PHY
 
 /* JMicron PHYs */
 model JMICRON JMP211		0x0021 JMP211 10/100/1000 media interface



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

2024-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 20 18:24:44 UTC 2024

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

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

sys/dev/mii/miidevs: revision 1.170
sys/dev/mii/miidevs: revision 1.171
sys/dev/mii/miidevs: revision 1.169

Add MaxLinear GPY21[125] 2.5G PHY.

miidevs: Update I22[56]
 - Add model 0x0001 and 0x0005 for I226 and 0x000c for I225.
   Need more info to write better descriptions.
 - Modify GPY211's description a little.

miidevs: Add MaxLinear GPY115.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.168.20.1 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-10] src/sys/dev/mii

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:36:46 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: mii_physubr.c

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

sys/dev/mii/mii_physubr.c: revision 1.103

Fix a bug when a media is changed to IFM_AUTO.

 Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.

IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.

Note that almost all drivers uses MIIF_DOPAUSE flags.

TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.


To generate a diff of this commit:
cvs rdiff -u -r1.101.4.1 -r1.101.4.2 src/sys/dev/mii/mii_physubr.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/mii_physubr.c
diff -u src/sys/dev/mii/mii_physubr.c:1.101.4.1 src/sys/dev/mii/mii_physubr.c:1.101.4.2
--- src/sys/dev/mii/mii_physubr.c:1.101.4.1	Wed Jun 21 22:11:29 2023
+++ src/sys/dev/mii/mii_physubr.c	Wed Jun 21 22:36:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mii_physubr.c,v 1.101.4.1 2023/06/21 22:11:29 martin Exp $	*/
+/*	$NetBSD: mii_physubr.c,v 1.101.4.2 2023/06/21 22:36:46 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.101.4.1 2023/06/21 22:11:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.101.4.2 2023/06/21 22:36:46 martin Exp $");
 
 #include 
 #include 
@@ -138,22 +138,14 @@ mii_phy_setmedia(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
 	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
+	u_int subtype;
 	uint16_t bmcr, anar, gtcr;
 
 	KASSERT(mii_locked(mii));
 
-	if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
-		/*
-		 * Force renegotiation if MIIF_DOPAUSE.
-		 *
-		 * XXX This is only necessary because many NICs don't
-		 * XXX advertise PAUSE capabilities at boot time.  Maybe
-		 * XXX we should force this only once?
-		 */
-		PHY_READ(sc, MII_BMCR, &bmcr);
-		if ((bmcr & BMCR_AUTOEN) == 0 ||
-		(sc->mii_flags & (MIIF_FORCEANEG | MIIF_DOPAUSE)))
-			(void) mii_phy_auto(sc);
+	subtype = IFM_SUBTYPE(ife->ifm_media);
+	if ((subtype == IFM_AUTO) || (subtype == IFM_1000_T)) {
+		(void) mii_phy_auto(sc);
 		return;
 	}
 
@@ -169,7 +161,7 @@ mii_phy_setmedia(struct mii_softc *sc)
 	gtcr = mii_media_table[ife->ifm_data].mm_gtcr;
 
 	if (mii->mii_media.ifm_media & IFM_ETH_MASTER) {
-		switch (IFM_SUBTYPE(ife->ifm_media)) {
+		switch (subtype) {
 		case IFM_1000_T:
 			gtcr |= GTCR_MAN_MS | GTCR_ADV_MS;
 			break;
@@ -198,10 +190,7 @@ mii_phy_setmedia(struct mii_softc *sc)
 	PHY_WRITE(sc, MII_ANAR, anar);
 	if (sc->mii_flags & MIIF_HAVE_GTCR)
 		PHY_WRITE(sc, MII_100T2CR, gtcr);
-	if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T)
-		mii_phy_auto(sc);
-	else
-		PHY_WRITE(sc, MII_BMCR, bmcr);
+	PHY_WRITE(sc, MII_BMCR, bmcr);
 }
 
 /* Setup autonegotiation and start it. */



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:36:46 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: mii_physubr.c

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

sys/dev/mii/mii_physubr.c: revision 1.103

Fix a bug when a media is changed to IFM_AUTO.

 Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.

IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.

Note that almost all drivers uses MIIF_DOPAUSE flags.

TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.


To generate a diff of this commit:
cvs rdiff -u -r1.101.4.1 -r1.101.4.2 src/sys/dev/mii/mii_physubr.c

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



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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:11:29 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: atphy.c brgphy.c ciphy.c ipgphy.c jmphy.c
mii_physubr.c tlphy.c urlphy.c

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

sys/dev/mii/ciphy.c: revision 1.42
sys/dev/mii/brgphy.c: revision 1.91
sys/dev/mii/mii_physubr.c: revision 1.102
sys/dev/mii/ipgphy.c: revision 1.11
sys/dev/mii/tlphy.c: revision 1.72
sys/dev/mii/jmphy.c: revision 1.5
sys/dev/mii/urlphy.c: revision 1.40
sys/dev/mii/atphy.c: revision 1.31

Retry autonegotiation every mii_anegticks seconds instead of mii_anegticks+1.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.90 -r1.90.20.1 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.41 -r1.41.20.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.4 -r1.4.24.1 src/sys/dev/mii/jmphy.c
cvs rdiff -u -r1.101 -r1.101.4.1 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.71 -r1.71.20.1 src/sys/dev/mii/tlphy.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/mii/urlphy.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/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.30 src/sys/dev/mii/atphy.c:1.30.22.1
--- src/sys/dev/mii/atphy.c:1.30	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/atphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.30 2020/03/15 23:04:50 thorpej Exp $ */
+/*	$NetBSD: atphy.c,v 1.30.22.1 2023/06/21 22:11:29 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.30 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.30.22.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -323,7 +323,7 @@ done:
 			break;
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		atphy_mii_phy_auto(sc);

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.90 src/sys/dev/mii/brgphy.c:1.90.20.1
--- src/sys/dev/mii/brgphy.c:1.90	Mon May 25 19:48:38 2020
+++ src/sys/dev/mii/brgphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.90.20.1 2023/06/21 22:11:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.90 2020/05/25 19:48:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.90.20.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -424,7 +424,7 @@ setit:
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
 		KASSERT(sc->mii_anegticks != 0);
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		brgphy_mii_phy_auto(sc);

Index: src/sys/dev/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.41 src/sys/dev/mii/ciphy.c:1.41.20.1
--- src/sys/dev/mii/ciphy.c:1.41	Mon Aug 24 04:23:41 2020
+++ src/sys/dev/mii/ciphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.41 2020/08/24 04:23:41 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.41.20.1 2023/06/21 22:11:29 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.41 2020/08/24 04:23:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.41.20.1 2023/06/21 22:11:29 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -270,7 +270,7 @@ setit:
 			break;
 
 		/* Only retry autonegotiation every N seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		mii_phy_auto_restart(sc);

Index: src/sys/dev/mii/ipgphy.c
diff -u src/sys/dev/mii/ipgphy.c:1.10 src/sys/dev/mii/ipgphy.c:1.10.24.1
--- src/sys/dev/mii/ipgphy.c:1.10	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/ipgphy.c	Wed Jun 21 22:11:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipgphy.c,v 1.10 2020/03/15 23:04:50 thorpej Exp $ */
+/*	$NetBSD: ipgphy.c,v 1.10.24.1 2023/06/21 22:11:29 martin Exp $ */
 /*	$OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.10 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.10.24.1 2023/06/21 22:11:29 martin Exp $");
 
 #include 
 #include 
@@ -237,7 +237,7 @@ done:
 			break;
 
 		/* Only retry autonegotiation every mii_anegticks seconds. */
-		if (sc->mii_ticks <= sc->mii_anegticks)
+		if (sc->mii_ticks < sc->mii_anegticks)
 			break;
 
 		sc->

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

2023-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 21 22:11:29 UTC 2023

Modified Files:
src/sys/dev/mii [netbsd-10]: atphy.c brgphy.c ciphy.c ipgphy.c jmphy.c
mii_physubr.c tlphy.c urlphy.c

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

sys/dev/mii/ciphy.c: revision 1.42
sys/dev/mii/brgphy.c: revision 1.91
sys/dev/mii/mii_physubr.c: revision 1.102
sys/dev/mii/ipgphy.c: revision 1.11
sys/dev/mii/tlphy.c: revision 1.72
sys/dev/mii/jmphy.c: revision 1.5
sys/dev/mii/urlphy.c: revision 1.40
sys/dev/mii/atphy.c: revision 1.31

Retry autonegotiation every mii_anegticks seconds instead of mii_anegticks+1.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.90 -r1.90.20.1 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.41 -r1.41.20.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/mii/ipgphy.c
cvs rdiff -u -r1.4 -r1.4.24.1 src/sys/dev/mii/jmphy.c
cvs rdiff -u -r1.101 -r1.101.4.1 src/sys/dev/mii/mii_physubr.c
cvs rdiff -u -r1.71 -r1.71.20.1 src/sys/dev/mii/tlphy.c
cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/mii/urlphy.c

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