* [PATCH] net: phy: intel-xway: workaround 100BASE-TX Link-Up issue
@ 2026-09-15 8:59 A. Sverdlin
2026-09-15 12:37 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: A. Sverdlin @ 2026-09-15 8:59 UTC (permalink / raw)
To: netdev
Cc: Alexander Sverdlin, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, Aleksander Jan Bajkowski, Daniel Golle,
John Crispin, Hauke Mehrtens, stable
From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
MaxLinear GSW12x/GSW14x Ethernet Switch Errata Sheet states:
"An issue has been sporadically observed after device power-on on the first
link-up attempt in 100BASE-TX mode resulting in either the link-up taking a
long time, or failing to link-up altogether...
Workaround:
After power-on, enable Cable Diagnostic Mode for all ports and disable
it..."
Implement the proposed workaround unconditionally in the Intel XWAY driver
(MaxLinear GSW1xx switches incorporate Intel XWAY PHYs) because the
diagnostic bits have the same meaning even in older integral PHYs such as
GPY111/PEF7071/PHY11G. So it's not clear how to distinguish the affected
newer integrated PHYs, but the workaround should not hurt the older PHYs.
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
---
drivers/net/phy/intel-xway.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/intel-xway.c b/drivers/net/phy/intel-xway.c
index afbcec7117443..3cee31bb931f2 100644
--- a/drivers/net/phy/intel-xway.c
+++ b/drivers/net/phy/intel-xway.c
@@ -16,6 +16,11 @@
#define XWAY_MDIO_ISTAT 0x1A /* interrupt status */
#define XWAY_MDIO_LED 0x1B /* led control */
+#define XWAY_MDIO_GCTRL_TM_MASK GENMASK(15, 13)
+#define XWAY_MDIO_GCTRL_TM(mode) FIELD_PREP(XWAY_MDIO_GCTRL_TM_MASK, (mode))
+#define XWAY_MDIO_GCTRL_TM_NOP XWAY_MDIO_GCTRL_TM(0) /* Normal operation */
+#define XWAY_MDIO_GCTRL_TM_CDIAG XWAY_MDIO_GCTRL_TM(6) /* Cable diagnostics */
+
#define XWAY_MDIO_ERRCNT_SEL GENMASK(11, 8)
#define XWAY_MDIO_ERRCNT_COUNT GENMASK(7, 0)
#define XWAY_MDIO_ERRCNT_SEL_RXERR 0
@@ -326,6 +331,28 @@ static int xway_gphy_probe(struct phy_device *phydev)
return 0;
}
+static int xway_11g_int_config_init(struct phy_device *phydev)
+{
+ int err;
+
+ /* An issue has been sporadically observed after device power-on on the
+ * first link-up attempt in 100BASE-TX mode resulting in either the
+ * link-up taking a long time, or failing to link-up altogether.
+ *
+ * Workaround:
+ * After power-on, enable Cable Diagnostic Mode for all ports and
+ * disable it.
+ */
+ err = phy_modify(phydev, MII_CTRL1000, XWAY_MDIO_GCTRL_TM_MASK, XWAY_MDIO_GCTRL_TM_CDIAG);
+ if (err)
+ return err;
+ err = phy_modify(phydev, MII_CTRL1000, XWAY_MDIO_GCTRL_TM_MASK, XWAY_MDIO_GCTRL_TM_NOP);
+ if (err)
+ return err;
+
+ return xway_gphy_config_init(phydev);
+}
+
static int xway_gphy14_config_aneg(struct phy_device *phydev)
{
int reg, err;
@@ -735,7 +762,7 @@ static struct phy_driver xway_gphy[] = {
.phy_id_mask = 0xffffffff,
.name = "Intel XWAY PHY11G (xRX v1.2 integrated)",
/* PHY_GBIT_FEATURES */
- .config_init = xway_gphy_config_init,
+ .config_init = xway_11g_int_config_init,
.probe = xway_gphy_probe,
.handle_interrupt = xway_gphy_handle_interrupt,
.config_intr = xway_gphy_config_intr,
--
2.55.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: intel-xway: workaround 100BASE-TX Link-Up issue
2026-09-15 8:59 [PATCH] net: phy: intel-xway: workaround 100BASE-TX Link-Up issue A. Sverdlin
@ 2026-09-15 12:37 ` Andrew Lunn
2026-09-15 12:47 ` Sverdlin, Alexander
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2026-09-15 12:37 UTC (permalink / raw)
To: A. Sverdlin
Cc: netdev, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-kernel,
Aleksander Jan Bajkowski, Daniel Golle, John Crispin,
Hauke Mehrtens, stable
On Tue, Sep 15, 2026 at 10:59:17AM +0200, A. Sverdlin wrote:
> From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
>
> MaxLinear GSW12x/GSW14x Ethernet Switch Errata Sheet states:
> "An issue has been sporadically observed after device power-on on the first
> link-up attempt in 100BASE-TX mode resulting in either the link-up taking a
> long time, or failing to link-up altogether...
>
> Workaround:
> After power-on, enable Cable Diagnostic Mode for all ports and disable
> it..."
>
> Implement the proposed workaround unconditionally in the Intel XWAY driver
> (MaxLinear GSW1xx switches incorporate Intel XWAY PHYs) because the
> diagnostic bits have the same meaning even in older integral PHYs such as
> GPY111/PEF7071/PHY11G. So it's not clear how to distinguish the affected
> newer integrated PHYs, but the workaround should not hurt the older PHYs.
>
> Cc: stable@vger.kernel.org
Please set the Subject: line correctly to indicate net, and include a
Fixes: tag.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Out if interest, is there sufficient details in the data sheet to
implement cable diagnostics?
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: intel-xway: workaround 100BASE-TX Link-Up issue
2026-09-15 12:37 ` Andrew Lunn
@ 2026-09-15 12:47 ` Sverdlin, Alexander
0 siblings, 0 replies; 3+ messages in thread
From: Sverdlin, Alexander @ 2026-09-15 12:47 UTC (permalink / raw)
To: andrew
Cc: hauke, linux, davem, hkallweit1, stable, linux-kernel, olek2,
kuba, netdev, edumazet, pabeni, john, daniel
Thanks for the timely feedback, Andrew!
On Tue, 2026-09-15 at 14:37 +0200, Andrew Lunn wrote:
> > MaxLinear GSW12x/GSW14x Ethernet Switch Errata Sheet states:
> > "An issue has been sporadically observed after device power-on on the first
> > link-up attempt in 100BASE-TX mode resulting in either the link-up taking a
> > long time, or failing to link-up altogether...
> >
> > Workaround:
> > After power-on, enable Cable Diagnostic Mode for all ports and disable
> > it..."
> >
> > Implement the proposed workaround unconditionally in the Intel XWAY driver
> > (MaxLinear GSW1xx switches incorporate Intel XWAY PHYs) because the
> > diagnostic bits have the same meaning even in older integral PHYs such as
> > GPY111/PEF7071/PHY11G. So it's not clear how to distinguish the affected
> > newer integrated PHYs, but the workaround should not hurt the older PHYs.
> >
> > Cc: stable@vger.kernel.org
>
> Please set the Subject: line correctly to indicate net, and include a
> Fixes: tag.
>
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Will fix in v2, sorry for that!
> Out if interest, is there sufficient details in the data sheet to
> implement cable diagnostics?
I'd say, no. I see no details on determining open/short circuit or cable
length, even though the datasheet claims the device supports it.
I've tried to activate Standard IEEE test patterns in the past, those
required for Ethernet compliance test -- it didn't work out of the box
and I've got no support on it from the vendor.
Same story with packet generator.
--
Alexander Sverdlin
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-15 12:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 8:59 [PATCH] net: phy: intel-xway: workaround 100BASE-TX Link-Up issue A. Sverdlin
2026-09-15 12:37 ` Andrew Lunn
2026-09-15 12:47 ` Sverdlin, Alexander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®