[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <489b2959-3374-4766-a982-9e7c26077899@lunn.ch>
Date: Wed, 20 Aug 2025 05:03:14 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Donald Hunter <donald.hunter@...il.com>,
Jonathan Corbet <corbet@....net>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Kory Maincent <kory.maincent@...tlin.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Nishanth Menon <nm@...com>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com, linux-doc@...r.kernel.org,
Michal Kubecek <mkubecek@...e.cz>, Roan van Dijk <roan@...tonic.nl>
Subject: Re: [PATCH net-next v2 1/5] ethtool: introduce core UAPI and driver
API for PHY MSE diagnostics
> Channel-to-pair mapping is normally straightforward, but in some cases
> (e.g. 100BASE-TX with MDI-X resolution unknown) the mapping is ambiguous.
> If hardware does not expose MDI-X status, the exact pair cannot be
> determined. To avoid returning misleading per-channel data in this case,
> a LINK selector is defined for aggregate MSE measurements.
This is the same with cable test. The API just labels the pairs using
ETHTOOL_A_CABLE_PAIR_A,
ETHTOOL_A_CABLE_PAIR_B,
ETHTOOL_A_CABLE_PAIR_C,
ETHTOOL_A_CABLE_PAIR_D,
It does not take into account MDI-X or anything.
> @@ -1174,6 +1246,60 @@ struct phy_driver {
> /** @get_sqi_max: Get the maximum signal quality indication */
> int (*get_sqi_max)(struct phy_device *dev);
>
> + /**
> + * get_mse_config - Get configuration and scale of MSE measurement
> + * @dev: PHY device
> + * @config: Output (filled on success)
> + *
> + * Fill @config with the PHY's MSE configuration for the current
> + * link mode: scale limits (max_average_mse, max_peak_mse), update
> + * interval (refresh_rate_ps), sample length (num_symbols) and the
> + * capability bitmask (supported_caps).
> + *
> + * Implementations may defer configuration until hardware has
> + * converged; in that case they should return -EAGAIN and allow the
> + * caller to retry later.
> + *
> + * Return:
> + * * 0 - success, @config is valid
> + * * -EOPNOTSUPP - MSE configuration not implemented by the PHY
> + * or not supported in the current link mode
> + * * -ENETDOWN - link is down and configuration is not
> + * available in that state
This seems a bit odd. phylib knows the state of the link. If it is
down, why would it even ask?
Andrew
Powered by blists - more mailing lists