[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b82a7a0-3882-4c6c-903e-1b43d8a7fc34@lunn.ch>
Date: Wed, 22 Nov 2023 18:24:22 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
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
> 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.
Andrew
Powered by blists - more mailing lists