[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9rfSuUO8P7RECOn@shell.armlinux.org.uk>
Date: Wed, 19 Mar 2025 15:14:18 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
Thangaraj Samynathan <Thangaraj.S@...rochip.com>,
Rengarajan Sundararajan <Rengarajan.S@...rochip.com>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, UNGLinuxDriver@...rochip.com,
Phil Elwell <phil@...pberrypi.org>, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net-next v5 2/6] net: usb: lan78xx: Convert to PHYlink
for improved PHY and MAC management
On Wed, Mar 19, 2025 at 11:48:02AM +0100, Maxime Chevallier wrote:
> Hi Oleksij,
>
> On Wed, 19 Mar 2025 09:49:48 +0100
> Oleksij Rempel <o.rempel@...gutronix.de> wrote:
>
> > Convert the LAN78xx driver to use the PHYlink framework for managing
> > PHY and MAC interactions.
> >
> > Key changes include:
> > - Replace direct PHY operations with phylink equivalents (e.g.,
> > phylink_start, phylink_stop).
> > - Introduce lan78xx_phylink_setup for phylink initialization and
> > configuration.
> > - Add phylink MAC operations (lan78xx_mac_config,
> > lan78xx_mac_link_down, lan78xx_mac_link_up) for managing link
> > settings and flow control.
> > - Remove redundant and now phylink-managed functions like
> > `lan78xx_link_status_change`.
> > - update lan78xx_get/set_pause to use phylink helpers
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
>
>
> [...]
>
> > @@ -5158,7 +5137,7 @@ static int lan78xx_reset_resume(struct usb_interface *intf)
> > if (ret < 0)
> > return ret;
> >
> > - phy_start(dev->net->phydev);
> > + phylink_start(dev->phylink);
>
> You need RTNL to be held when calling this function.
>
> I'm not familiar with USB but from what I get, this function is part of
> the resume path (resume by resetting). I think you also need to
> address the suspend path, it still has calls to
> netif_carrier_off(dev->net), and you may need to use
> phylink_suspend() / phylink_resume() ? (not sure)
phylink_suspend/resume are very much preferred in suspend/resume paths
over stop/start.
Remember that phylink_resume() (and phylink_start()) may result in the
link coming up *immediately* so should be the last step. stmmac gets
this wrong, which can cause problems (as well as solving the lack of
RXC issue.)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists