All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Woojung Huh <woojung.huh@microchip.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Thangaraj Samynathan <Thangaraj.S@microchip.com>,
	Rengarajan Sundararajan <Rengarajan.S@microchip.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
	Phil Elwell <phil@raspberrypi.org>,
	Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net-next v5 2/6] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management
Date: Wed, 19 Mar 2025 15:14:18 +0000	[thread overview]
Message-ID: <Z9rfSuUO8P7RECOn@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250319114802.4d470655@fedora.home>

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@pengutronix.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@pengutronix.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!

  reply	other threads:[~2025-03-19 15:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  8:49 [PATCH net-next v5 0/6] Convert LAN78xx to PHYLINK Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 1/6] net: usb: lan78xx: Improve error handling in PHY initialization Oleksij Rempel
2025-03-24 15:31   ` Russell King (Oracle)
2025-03-25 17:46   ` Rengarajan.S
2025-03-25 20:06     ` Andrew Lunn
2025-03-19  8:49 ` [PATCH net-next v5 2/6] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management Oleksij Rempel
2025-03-19 10:48   ` Maxime Chevallier
2025-03-19 15:14     ` Russell King (Oracle) [this message]
2025-03-24 16:18   ` Russell King (Oracle)
2025-03-25 17:37   ` Rengarajan.S
2025-03-25 18:26     ` Russell King (Oracle)
2025-03-19  8:49 ` [PATCH net-next v5 3/6] net: usb: lan78xx: Use ethtool_op_get_link to reflect current link status Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 4/6] net: usb: lan78xx: port link settings to phylink API Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 5/6] net: usb: lan78xx: Integrate EEE support with phylink LPI API Oleksij Rempel
2025-03-25 17:51   ` Rengarajan.S
2025-03-25 18:34     ` Russell King (Oracle)
2025-03-19  8:49 ` [PATCH net-next v5 6/6] net: usb: lan78xx: remove unused struct members Oleksij Rempel
2025-03-24 16:20   ` Russell King (Oracle)

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=Z9rfSuUO8P7RECOn@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Rengarajan.S@microchip.com \
    --cc=Thangaraj.S@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=phil@raspberrypi.org \
    --cc=woojung.huh@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.