[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZV45zcqA88rcNy7G@shell.armlinux.org.uk>
Date: Wed, 22 Nov 2023 17:26:37 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jiawen Wu <jiawenwu@...stnetic.com>, netdev@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next 1/5] net: wangxun: add flow control support
On Wed, Nov 22, 2023 at 06:24:22PM +0100, Andrew Lunn wrote:
> > However, if autoneg is supported, but pause autoneg is disabled, there
> > is still the need to update the PHY's advertisement so the remote end
> > knows what's going on, as documented in the user API:
> >
> > " * If the link is autonegotiated, drivers should use
> > * mii_advertise_flowctrl() or similar code to set the advertised
> > * pause frame capabilities based on the @rx_pause and @tx_pause flags,
> > * even if @autoneg is zero. ... "
> >
> > You are correct that when !pause->autoneg, tx_pause/rx_pause are to be
> > used in place of the negotiated versions.
> >
> > Also... when getting the pause parameters, tx_pause/rx_pause _should_
> > reflect what was set for these parameters via the set function, *not*
> > the current state affected by negotiation.
>
> All good reasons to just use phylink which handles all this for you.
Indeed... consistent implementation and therefore behaviour (assuming
users of phylink are implemented correctly!) :)
--
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