netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Alvin Šipraga" <alvin@pqrs.dk>
Cc: luizluca@gmail.com, "Linus Walleij" <linus.walleij@linaro.org>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY
Date: Tue, 7 Jun 2022 19:52:25 +0100	[thread overview]
Message-ID: <Yp+eaUiOwZts/HgS@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220607184624.417641-1-alvin@pqrs.dk>

On Tue, Jun 07, 2022 at 08:46:24PM +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Since commit a18e6521a7d9 ("net: phylink: handle NA interface mode in
> phylink_fwnode_phy_connect()"), phylib defaults to GMII when no phy-mode
> or phy-connection-type property is specified in a DSA port node of the
> device tree. The same commit caused a regression in rtl8365mb whereby
> phylink would fail to connect, because the driver did not advertise
> support for GMII for ports with internal PHY.
> 
> It should be noted that the aforementioned regression is not because the
> blamed commit was incorrect: on the contrary, the blamed commit is
> correcting the previous behaviour whereby unspecified phy-mode would
> cause the internal interface mode to be PHY_INTERFACE_MODE_NA. The
> rtl8365mb driver only worked by accident before because it _did_
> advertise support for PHY_INTERFACE_MODE_NA, despite NA being reserved
> for internal use by phylink. With one mistake fixed, the other was
> exposed.
> 
> Commit a5dba0f207e5 ("net: dsa: rtl8365mb: add GMII as user port mode")
> then introduced implicit support for GMII mode on ports with internal
> PHY to allow a PHY connection for device trees where the phy-mode is not
> explicitly set to "internal". At this point everything was working OK
> again.
> 
> Subsequently, commit 6ff6064605e9 ("net: dsa: realtek: convert to
> phylink_generic_validate()") broke this behaviour again by discarding
> the usage of rtl8365mb_phy_mode_supported() - where this GMII support
> was indicated - while switching to the new .phylink_get_caps API.
> 
> With the new API, rtl8365mb_phy_mode_supported() is no longer needed.
> Remove it altogether and add back the GMII capability - this time to
> rtl8365mb_phylink_get_caps() - so that the above default behaviour works
> for ports with internal PHY again.
> 
> Fixes: 6ff6064605e9 ("net: dsa: realtek: convert to phylink_generic_validate()")
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Even though I raised concerns about the ext_int thing previously, this
is still a step forward, so:

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

Thanks!

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

  reply	other threads:[~2022-06-07 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 18:46 [PATCH net v2] net: dsa: realtek: rtl8365mb: fix GMII caps for ports with internal PHY Alvin Šipraga
2022-06-07 18:52 ` Russell King (Oracle) [this message]
2022-06-09  4:10 ` patchwork-bot+netdevbpf

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=Yp+eaUiOwZts/HgS@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alsi@bang-olufsen.dk \
    --cc=alvin@pqrs.dk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).