public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: vitesse: add inband caps and configuration
@ 2026-03-11  1:07 Russell King (Oracle)
  2026-03-11  9:22 ` Conor Dooley
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Russell King (Oracle) @ 2026-03-11  1:07 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Conor Dooley, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni

Add support for VSC8662 reporting its inband capabilities, and also
hook to configure the PHY's inband mode.

This fixes a regression in the macb driver caused by commit
1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")

Reported-by: Conor Dooley <conor@kernel.org>
Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/vitesse.c | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index b1b7bbba284e..1a430e832f66 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -62,6 +62,13 @@
 /* Vitesse Extended Page Access Register */
 #define MII_VSC82X4_EXT_PAGE_ACCESS	0x1f
 
+/* Vitesse VSC8662 extended control register */
+#define VSC8662_EXT_CON1		0x17
+#define VSC8662_EXT_CON_MAC_AN		BIT(13)
+
+#define VSC8662_MAC_AN			0x1b
+#define VSC8662_MAC_AN_BYPASS		BIT(13)
+
 /* Vitesse VSC73XX Extended Control Register */
 #define MII_VSC73XX_PHY_CTRL_EXT3		0x14
 
@@ -140,6 +147,38 @@ static int vsc824x_config_init(struct phy_device *phydev)
 	return err;
 }
 
+static unsigned int vsc8662_inband_caps(struct phy_device *phydev,
+					phy_interface_t interface)
+{
+	if (interface == PHY_INTERFACE_MODE_SGMII)
+		return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE |
+		       LINK_INBAND_BYPASS;
+
+	return 0;
+}
+
+static int vsc8662_config_inband(struct phy_device *phydev, unsigned int modes)
+{
+	u16 mask, set;
+	int ret;
+
+	mask = VSC8662_MAC_AN_BYPASS;
+	set = modes & LINK_INBAND_BYPASS ? mask : 0;
+	ret = phy_modify(phydev, VSC8662_MAC_AN, mask, set);
+	if (ret < 0)
+		return ret;
+
+	mask = VSC8662_EXT_CON_MAC_AN;
+	set = modes & (LINK_INBAND_ENABLE | LINK_INBAND_BYPASS) ? mask : 0;
+
+	ret = phy_modify_changed(phydev, VSC8662_EXT_CON1, mask, set);
+	if (ret <= 0)
+		return ret;
+
+	/* We need to soft-reset the PHY when changing VSC8662_EXT_CON_MAC_AN */
+	return genphy_soft_reset(phydev);
+}
+
 #define VSC73XX_EXT_PAGE_ACCESS 0x1f
 
 static int vsc73xx_read_page(struct phy_device *phydev)
@@ -649,6 +688,8 @@ static struct phy_driver vsc82xx_driver[] = {
 	.phy_id_mask    = 0x000ffff0,
 	/* PHY_GBIT_FEATURES */
 	.config_init    = &vsc824x_config_init,
+	.inband_caps	= vsc8662_inband_caps,
+	.config_inband	= vsc8662_config_inband,
 	.config_aneg    = &vsc82x4_config_aneg,
 	.config_intr    = &vsc82xx_config_intr,
 	.handle_interrupt = &vsc82xx_handle_interrupt,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11  1:07 [PATCH net-next] net: phy: vitesse: add inband caps and configuration Russell King (Oracle)
@ 2026-03-11  9:22 ` Conor Dooley
  2026-03-11 14:01 ` Geert Uytterhoeven
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Conor Dooley @ 2026-03-11  9:22 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

On Wed, Mar 11, 2026 at 01:07:00AM +0000, Russell King (Oracle) wrote:
> Add support for VSC8662 reporting its inband capabilities, and also
> hook to configure the PHY's inband mode.
> 
> This fixes a regression in the macb driver caused by commit
> 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> 
> Reported-by: Conor Dooley <conor@kernel.org>
> Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Tested-by: Conor Dooley <conor.dooley@microchip.com>

Thanks Russell.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11  1:07 [PATCH net-next] net: phy: vitesse: add inband caps and configuration Russell King (Oracle)
  2026-03-11  9:22 ` Conor Dooley
@ 2026-03-11 14:01 ` Geert Uytterhoeven
  2026-03-11 14:26   ` Russell King (Oracle)
  2026-03-11 14:02 ` Geert Uytterhoeven
  2026-03-13  1:00 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2026-03-11 14:01 UTC (permalink / raw)
  To: rmk+kernel
  Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni,
	Geert Uytterhoeven

	Hi Russell,

On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> Add support for VSC8662 reporting its inband capabilities, and also
> hook to configure the PHY's inband mode.
>
> This fixes a regression in the macb driver caused by commit
> 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")

Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")

> Reported-by: Conor Dooley <conor@kernel.org>
> Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud

s/Link/Closes/

> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks, this fixes the regression on MPFS Icicle I bisected to the
aforementioned commit.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11  1:07 [PATCH net-next] net: phy: vitesse: add inband caps and configuration Russell King (Oracle)
  2026-03-11  9:22 ` Conor Dooley
  2026-03-11 14:01 ` Geert Uytterhoeven
@ 2026-03-11 14:02 ` Geert Uytterhoeven
  2026-03-13  1:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2026-03-11 14:02 UTC (permalink / raw)
  To: rmk+kernel
  Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni,
	Geert Uytterhoeven

	Hi Russell,

On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> Add support for VSC8662 reporting its inband capabilities, and also
> hook to configure the PHY's inband mode.
>
> This fixes a regression in the macb driver caused by commit
> 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")

Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")

> Reported-by: Conor Dooley <conor@kernel.org>
> Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud

s/Link/Closes/

> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks, this fixes the regression on MPFS Icicle I bisected to the
aforementioned commit.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 14:01 ` Geert Uytterhoeven
@ 2026-03-11 14:26   ` Russell King (Oracle)
  2026-03-11 14:43     ` Geert Uytterhoeven
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Russell King (Oracle) @ 2026-03-11 14:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni

On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> 	Hi Russell,
> 
> On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > Add support for VSC8662 reporting its inband capabilities, and also
> > hook to configure the PHY's inband mode.
> >
> > This fixes a regression in the macb driver caused by commit
> > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> 
> Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> 
> > Reported-by: Conor Dooley <conor@kernel.org>
> > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> 
> s/Link/Closes/

I avoided it because any other PHY used with macb that is also connected
via SGMII will run into this same issue. It just happens that adding
this support fixes the above commit.

Conversely, we have stmmac, which unconditionally enables SGMII inband
at the MAC end no matter what phylink says to do, and should this
PHY be used with this patch in a stmmac system, it will cause that to
break, because we end up with either end misconfigured.

Also, if this commit is applied without the macb change, you'll
probably also find that macb breaks (please test that.) 

So, while this is a solution and a step forward, I'd rather not suggest
that it is an official fix to the macb issue - it's merely filling in
a missing piece of the jigsaw.

Sadly, this is a fundamental issue with SGMII implementations today:
whether SGMII inband is used/required is completely random both at the
MAC/PCS end but also at the PHY end. If one ends up with a mismatch,
then things stop working.

As I say, the problem with fixing the PHY end of the link is that
it could cause a different network driver to regress.

So yes, this is a solution to the macb problem, but I regard it as
high risk.

That said, given the SGMII mess, there is no easy way forward.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 14:26   ` Russell King (Oracle)
@ 2026-03-11 14:43     ` Geert Uytterhoeven
  2026-03-11 14:54       ` Russell King (Oracle)
  2026-03-11 15:04     ` Conor Dooley
  2026-03-11 15:28     ` Charles Perry
  2 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2026-03-11 14:43 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni

Hi Russell,

On Wed, 11 Mar 2026 at 15:26, Russell King (Oracle)
<linux@armlinux.org.uk> wrote:
> On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > > Add support for VSC8662 reporting its inband capabilities, and also
> > > hook to configure the PHY's inband mode.
> > >
> > > This fixes a regression in the macb driver caused by commit
> > > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> >
> > Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> >
> > > Reported-by: Conor Dooley <conor@kernel.org>
> > > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> >
> > s/Link/Closes/
>
> I avoided it because any other PHY used with macb that is also connected
> via SGMII will run into this same issue. It just happens that adding
> this support fixes the above commit.
>
> Conversely, we have stmmac, which unconditionally enables SGMII inband
> at the MAC end no matter what phylink says to do, and should this
> PHY be used with this patch in a stmmac system, it will cause that to
> break, because we end up with either end misconfigured.
>
> Also, if this commit is applied without the macb change, you'll
> probably also find that macb breaks (please test that.)

Correct, it breaks in a similar way.

> So, while this is a solution and a step forward, I'd rather not suggest
> that it is an official fix to the macb issue - it's merely filling in
> a missing piece of the jigsaw.

Well, when the stable machinery will discover the word "fix" in commit
1338cfef1ff1b958, it will backport it.  With the Fixes tag, this patch
will be backported, too, keeping at least the MPFS Icicle users happy ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 14:43     ` Geert Uytterhoeven
@ 2026-03-11 14:54       ` Russell King (Oracle)
  0 siblings, 0 replies; 13+ messages in thread
From: Russell King (Oracle) @ 2026-03-11 14:54 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni

On Wed, Mar 11, 2026 at 03:43:30PM +0100, Geert Uytterhoeven wrote:
> Hi Russell,
> 
> On Wed, 11 Mar 2026 at 15:26, Russell King (Oracle)
> <linux@armlinux.org.uk> wrote:
> > On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> > > On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > > > Add support for VSC8662 reporting its inband capabilities, and also
> > > > hook to configure the PHY's inband mode.
> > > >
> > > > This fixes a regression in the macb driver caused by commit
> > > > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> > >
> > > Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> > >
> > > > Reported-by: Conor Dooley <conor@kernel.org>
> > > > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> > >
> > > s/Link/Closes/
> >
> > I avoided it because any other PHY used with macb that is also connected
> > via SGMII will run into this same issue. It just happens that adding
> > this support fixes the above commit.
> >
> > Conversely, we have stmmac, which unconditionally enables SGMII inband
> > at the MAC end no matter what phylink says to do, and should this
> > PHY be used with this patch in a stmmac system, it will cause that to
> > break, because we end up with either end misconfigured.
> >
> > Also, if this commit is applied without the macb change, you'll
> > probably also find that macb breaks (please test that.)
> 
> Correct, it breaks in a similar way.
> 
> > So, while this is a solution and a step forward, I'd rather not suggest
> > that it is an official fix to the macb issue - it's merely filling in
> > a missing piece of the jigsaw.
> 
> Well, when the stable machinery will discover the word "fix" in commit
> 1338cfef1ff1b958, it will backport it.  With the Fixes tag, this patch
> will be backported, too, keeping at least the MPFS Icicle users happy ;-)

... and potentially breaking other users. I would prefer stable not to
backport this patch, or the original patch that introduced the
breakage.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 14:26   ` Russell King (Oracle)
  2026-03-11 14:43     ` Geert Uytterhoeven
@ 2026-03-11 15:04     ` Conor Dooley
  2026-03-11 15:28     ` Charles Perry
  2 siblings, 0 replies; 13+ messages in thread
From: Conor Dooley @ 2026-03-11 15:04 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Geert Uytterhoeven, andrew, davem, edumazet, kuba, netdev, pabeni,
	Charles Perry

[-- Attachment #1: Type: text/plain, Size: 2773 bytes --]

On Wed, Mar 11, 2026 at 02:26:11PM +0000, Russell King (Oracle) wrote:
> On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> > 	Hi Russell,
> > 
> > On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > > Add support for VSC8662 reporting its inband capabilities, and also
> > > hook to configure the PHY's inband mode.
> > >
> > > This fixes a regression in the macb driver caused by commit
> > > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> > 
> > Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> > 
> > > Reported-by: Conor Dooley <conor@kernel.org>
> > > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> > 
> > s/Link/Closes/
> 
> I avoided it because any other PHY used with macb that is also connected
> via SGMII will run into this same issue. It just happens that adding
> this support fixes the above commit.
> 
> Conversely, we have stmmac, which unconditionally enables SGMII inband
> at the MAC end no matter what phylink says to do, and should this
> PHY be used with this patch in a stmmac system, it will cause that to
> break, because we end up with either end misconfigured.
> 
> Also, if this commit is applied without the macb change, you'll
> probably also find that macb breaks (please test that.) 

I just did, and it does break.

> So, while this is a solution and a step forward, I'd rather not suggest
> that it is an official fix to the macb issue - it's merely filling in
> a missing piece of the jigsaw.

Yeah, and the other thing to bear in mind is that this is just one PHY,
right? I kinda tunnel visioned on this fixing the board right in front
of me, but of course every other board with this particular SoC uses a
different PHY. The other board I have on hand is mpfs-beaglev-fire.dts,
which uses a rtl8211, and that remains non-functional with your patch
applied, for obvious reasons.

> Sadly, this is a fundamental issue with SGMII implementations today:
> whether SGMII inband is used/required is completely random both at the
> MAC/PCS end but also at the PHY end. If one ends up with a mismatch,
> then things stop working.
> 
> As I say, the problem with fixing the PHY end of the link is that
> it could cause a different network driver to regress.
> 
> So yes, this is a solution to the macb problem, but I regard it as
> high risk.
> 
> That said, given the SGMII mess, there is no easy way forward.

Ye, what do we do? Should the old behaviour be retained for all but the
new platform that Charles Perry is adding support for? Otherwise we are
just playing phy driver whack-a-mole, and (as you said) hoping we don't
introduce regressions elsewhere.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 14:26   ` Russell King (Oracle)
  2026-03-11 14:43     ` Geert Uytterhoeven
  2026-03-11 15:04     ` Conor Dooley
@ 2026-03-11 15:28     ` Charles Perry
  2026-03-11 15:38       ` Conor Dooley
  2 siblings, 1 reply; 13+ messages in thread
From: Charles Perry @ 2026-03-11 15:28 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Geert Uytterhoeven, andrew, conor, davem, edumazet, kuba, netdev,
	pabeni, charles.perry

On Wed, Mar 11, 2026 at 02:26:11PM +0000, Russell King (Oracle) wrote:
> On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> > 	Hi Russell,
> > 
> > On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > > Add support for VSC8662 reporting its inband capabilities, and also
> > > hook to configure the PHY's inband mode.
> > >
> > > This fixes a regression in the macb driver caused by commit
> > > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> > 
> > Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> > 
> > > Reported-by: Conor Dooley <conor@kernel.org>
> > > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> > 
> > s/Link/Closes/
> 
> I avoided it because any other PHY used with macb that is also connected
> via SGMII will run into this same issue. It just happens that adding
> this support fixes the above commit.
> 
> Conversely, we have stmmac, which unconditionally enables SGMII inband
> at the MAC end no matter what phylink says to do, and should this
> PHY be used with this patch in a stmmac system, it will cause that to
> break, because we end up with either end misconfigured.
> 

macb also unconditionally activated inband aneg before I added the
->pcs_config() callback.

One of the way I think we could fix macb is by adding:

        if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
                bp->phylink_config.poll_fixed_state = true;
                bp->phylink_config.get_fixed_state = macb_get_pcs_fixed_state;
+               bp->phylink_config.default_an_inband = true;
        }

in macb_mii_probe(). This would force phylink into using inband aneg
every time, unless there's a fixed link or the PHY explicitly doesn't
support in-band. This would make it compatible with legacy system that were
setup with in-band aneg activated. It would fix MPFS without the need for
this patch or device-tree modifications ('managed = "in-band-status"').

Thanks,
Charles

> Also, if this commit is applied without the macb change, you'll
> probably also find that macb breaks (please test that.) 
> 
> So, while this is a solution and a step forward, I'd rather not suggest
> that it is an official fix to the macb issue - it's merely filling in
> a missing piece of the jigsaw.
> 
> Sadly, this is a fundamental issue with SGMII implementations today:
> whether SGMII inband is used/required is completely random both at the
> MAC/PCS end but also at the PHY end. If one ends up with a mismatch,
> then things stop working.
> 
> As I say, the problem with fixing the PHY end of the link is that
> it could cause a different network driver to regress.
> 
> So yes, this is a solution to the macb problem, but I regard it as
> high risk.
> 
> That said, given the SGMII mess, there is no easy way forward.
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11 15:28     ` Charles Perry
@ 2026-03-11 15:38       ` Conor Dooley
  0 siblings, 0 replies; 13+ messages in thread
From: Conor Dooley @ 2026-03-11 15:38 UTC (permalink / raw)
  To: Charles Perry
  Cc: Russell King (Oracle), Geert Uytterhoeven, andrew, davem,
	edumazet, kuba, netdev, pabeni

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

On Wed, Mar 11, 2026 at 08:28:17AM -0700, Charles Perry wrote:
> On Wed, Mar 11, 2026 at 02:26:11PM +0000, Russell King (Oracle) wrote:
> > On Wed, Mar 11, 2026 at 03:01:35PM +0100, Geert Uytterhoeven wrote:
> > > 	Hi Russell,
> > > 
> > > On Wed, 11 Mar 2026 at 01:07, Russell King <rmk@armlinux.org.uk> wrote:
> > > > Add support for VSC8662 reporting its inband capabilities, and also
> > > > hook to configure the PHY's inband mode.
> > > >
> > > > This fixes a regression in the macb driver caused by commit
> > > > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> > > 
> > > Fixes: 1338cfef1ff1b958 ("net: macb: fix SGMII with inband aneg disabled")
> > > 
> > > > Reported-by: Conor Dooley <conor@kernel.org>
> > > > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> > > 
> > > s/Link/Closes/
> > 
> > I avoided it because any other PHY used with macb that is also connected
> > via SGMII will run into this same issue. It just happens that adding
> > this support fixes the above commit.
> > 
> > Conversely, we have stmmac, which unconditionally enables SGMII inband
> > at the MAC end no matter what phylink says to do, and should this
> > PHY be used with this patch in a stmmac system, it will cause that to
> > break, because we end up with either end misconfigured.
> > 
> 
> macb also unconditionally activated inband aneg before I added the
> ->pcs_config() callback.
> 
> One of the way I think we could fix macb is by adding:
> 
>         if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
>                 bp->phylink_config.poll_fixed_state = true;
>                 bp->phylink_config.get_fixed_state = macb_get_pcs_fixed_state;
> +               bp->phylink_config.default_an_inband = true;
>         }
> 
> in macb_mii_probe(). This would force phylink into using inband aneg
> every time, unless there's a fixed link or the PHY explicitly doesn't
> support in-band. This would make it compatible with legacy system that were
> setup with in-band aneg activated. It would fix MPFS without the need for
> this patch or device-tree modifications ('managed = "in-band-status"').

No commentary on whether or not this is the correct approach, but it
restores functionality on both boards I have on-hand.

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-11  1:07 [PATCH net-next] net: phy: vitesse: add inband caps and configuration Russell King (Oracle)
                   ` (2 preceding siblings ...)
  2026-03-11 14:02 ` Geert Uytterhoeven
@ 2026-03-13  1:00 ` patchwork-bot+netdevbpf
  2026-03-13  9:50   ` Conor Dooley
  3 siblings, 1 reply; 13+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-13  1:00 UTC (permalink / raw)
  To: Russell King; +Cc: andrew, conor, davem, edumazet, kuba, netdev, pabeni

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 11 Mar 2026 01:07:00 +0000 you wrote:
> Add support for VSC8662 reporting its inband capabilities, and also
> hook to configure the PHY's inband mode.
> 
> This fixes a regression in the macb driver caused by commit
> 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> 
> Reported-by: Conor Dooley <conor@kernel.org>
> Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> 
> [...]

Here is the summary with links:
  - [net-next] net: phy: vitesse: add inband caps and configuration
    https://git.kernel.org/netdev/net-next/c/6e263aadbaf2

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-13  1:00 ` patchwork-bot+netdevbpf
@ 2026-03-13  9:50   ` Conor Dooley
  2026-03-14  1:59     ` Jakub Kicinski
  0 siblings, 1 reply; 13+ messages in thread
From: Conor Dooley @ 2026-03-13  9:50 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf
  Cc: Russell King, andrew, davem, edumazet, kuba, netdev, pabeni

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

On Fri, Mar 13, 2026 at 01:00:11AM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (main)
> by Jakub Kicinski <kuba@kernel.org>:
> 
> On Wed, 11 Mar 2026 01:07:00 +0000 you wrote:
> > Add support for VSC8662 reporting its inband capabilities, and also
> > hook to configure the PHY's inband mode.
> > 
> > This fixes a regression in the macb driver caused by commit
> > 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
> > 
> > Reported-by: Conor Dooley <conor@kernel.org>
> > Link: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > 
> > [...]
> 
> Here is the summary with links:
>   - [net-next] net: phy: vitesse: add inband caps and configuration
>     https://git.kernel.org/netdev/net-next/c/6e263aadbaf2

Hmm, should this have been done? Charles proposed a different patch in
this thread that got posted here: abMa8e_2fjRkeOix@shell.armlinux.org.uk
It seems to have less chance for impacting other ethernet controller
drivers negatively.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
  2026-03-13  9:50   ` Conor Dooley
@ 2026-03-14  1:59     ` Jakub Kicinski
  0 siblings, 0 replies; 13+ messages in thread
From: Jakub Kicinski @ 2026-03-14  1:59 UTC (permalink / raw)
  To: Conor Dooley
  Cc: patchwork-bot+netdevbpf, Russell King, andrew, davem, edumazet,
	netdev, pabeni

On Fri, 13 Mar 2026 09:50:09 +0000 Conor Dooley wrote:
> > Here is the summary with links:
> >   - [net-next] net: phy: vitesse: add inband caps and configuration
> >     https://git.kernel.org/netdev/net-next/c/6e263aadbaf2  
> 
> Hmm, should this have been done? Charles proposed a different patch in
> this thread that got posted here: abMa8e_2fjRkeOix@shell.armlinux.org.uk
> It seems to have less chance for impacting other ethernet controller
> drivers negatively.

Sorry, we've been getting 150 patches a day this week.
A bit hard to keep track. If y'all could please post
a necessary follow up I'd appreciate.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-14  1:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11  1:07 [PATCH net-next] net: phy: vitesse: add inband caps and configuration Russell King (Oracle)
2026-03-11  9:22 ` Conor Dooley
2026-03-11 14:01 ` Geert Uytterhoeven
2026-03-11 14:26   ` Russell King (Oracle)
2026-03-11 14:43     ` Geert Uytterhoeven
2026-03-11 14:54       ` Russell King (Oracle)
2026-03-11 15:04     ` Conor Dooley
2026-03-11 15:28     ` Charles Perry
2026-03-11 15:38       ` Conor Dooley
2026-03-11 14:02 ` Geert Uytterhoeven
2026-03-13  1:00 ` patchwork-bot+netdevbpf
2026-03-13  9:50   ` Conor Dooley
2026-03-14  1:59     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox