[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221122094131.jkgy5thhrlio4425@skbuf>
Date: Tue, 22 Nov 2022 11:41:31 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
UNGLinuxDriver@...rochip.com,
bcm-kernel-feedback-list@...adcom.com,
Madalin Bucur <madalin.bucur@....nxp.com>,
Camelia Groza <camelia.groza@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
Ioana Ciornei <ioana.ciornei@....com>,
Maxim Kochetkov <fido_max@...ox.ru>,
Sean Anderson <sean.anderson@...o.com>,
Antoine Tenart <atenart@...nel.org>,
Michael Walle <michael@...le.cc>,
Raag Jadav <raagjadav@...il.com>,
Siddharth Vadapalli <s-vadapalli@...com>,
Ong Boon Leong <boon.leong.ong@...el.com>,
Colin Foster <colin.foster@...advantage.com>,
Marek Behun <marek.behun@....cz>
Subject: Re: [PATCH v4 net-next 2/8] net: phylink: introduce generic method
to query PHY in-band autoneg capability
On Tue, Nov 22, 2022 at 09:21:36AM +0000, Russell King (Oracle) wrote:
> > +enum phy_an_inband {
> > + PHY_AN_INBAND_UNKNOWN = BIT(0),
> > + PHY_AN_INBAND_OFF = BIT(1),
> > + PHY_AN_INBAND_ON = BIT(2),
> > +};
>
> There is another option here:
>
> - unknown (basically, PHY driver doesn't implement the function or
> can't report)
> - off (PHY driver knows for certain that in-band isn't used)
> - on (PHY driver knows that in-band is required and must be
> acknowledged)
> - on-but-not-required (PHY driver knows that in-band can be used, but
> the PHY has hardware support for timing out waiting for the in-band
> acknowledgement - Marvell PHYs support this.)
>
> Maybe the fourth state can be indicated by setting both _OFF and _ON ?
>
> Given that there's four states, does it make sense for this to be a
> bitfield?
Setting both _OFF and _ON in the capability report would already have
the meaning that it's configurable via a subsequent call to
phy_config_an_inband(). It's really configurable in VSC8514. I suppose
introducing PHY_AN_INBAND_ON_TIMEOUT = BIT(3) could make sense as
another option for the capability, orthogonal to the other 2.
Maybe it would be useful in itself if the MAC cannot support MLO_AN_INBAND,
like the Lynx PCS in 2500base-x, and the PHY only reports PHY_AN_INBAND_ON |
PHY_AN_INBAND_ON_TIMEOUT (hypothetical example). Phylink would pick
PHY_AN_INBAND_ON_TIMEOUT.
Given that I don't have a use case for this, should I add PHY_AN_INBAND_ON_TIMEOUT
to this patch set or should that be done by someone for whom it makes a difference?
The relevant implication for this patch set is the function prototype of
phy_config_an_enabled(struct phy_device *phydev, bool enabled). It
shouldn't take a bool enabled, but an enum phy_an_inband for future
extensibility (and reject/ignore PHY_AN_INBAND_UNKNOWN).
Powered by blists - more mailing lists