public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Perry <charles.perry@microchip.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>, <andrew@lunn.ch>,
	<conor@kernel.org>, <davem@davemloft.net>, <edumazet@google.com>,
	<kuba@kernel.org>, <netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<charles.perry@microchip.com>
Subject: Re: [PATCH net-next] net: phy: vitesse: add inband caps and configuration
Date: Wed, 11 Mar 2026 08:28:17 -0700	[thread overview]
Message-ID: <abGKEfPmxjyiNWer@bby-cbu-swbuild03.eng.microchip.com> (raw)
In-Reply-To: <abF7g9kZk5-9YN5_@shell.armlinux.org.uk>

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!

  parent reply	other threads:[~2026-03-11 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abGKEfPmxjyiNWer@bby-cbu-swbuild03.eng.microchip.com \
    --to=charles.perry@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=conor@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox