[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aF68rU2XQQ8a3ww4@pengutronix.de>
Date: Fri, 27 Jun 2025 17:45:49 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: kernel@...gutronix.de, linux-kernel@...r.kernel.org,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/1] phy: micrel: add Signal Quality
Indicator (SQI) support for KSZ9477 switch PHYs
On Fri, Jun 27, 2025 at 01:25:39PM +0200, Oleksij Rempel wrote:
> Add support for the Signal Quality Indicator (SQI) feature on KSZ9477
> family switches, providing a relative measure of receive signal quality.
>
> The hardware exposes separate SQI readings per channel. For 1000BASE-T,
> all four channels are read. For 100BASE-TX, only one channel is reported,
> but which receive pair is active depends on Auto MDI-X negotiation, which
> is not exposed by the hardware. Therefore, it is not possible to reliably
> map the measured channel to a specific wire pair.
>
> This resolves an earlier discussion about how to handle multi-channel
> SQI. Originally, the plan was to expose all channels individually.
> However, since pair mapping is sometimes unavailable, this
> implementation treats SQI as a per-link metric instead. This fallback
> avoids ambiguity and ensures consistent behavior. The existing get_sqi()
> UAPI was designed for single-pair Ethernet (SPE), where per-pair and
> per-link are effectively equivalent. Restricting its use to per-link
> metrics does not introduce regressions for existing users.
>
> The raw 7-bit SQI value (0–127, lower is better) is converted to the
> standard 0–7 (high is better) scale. Empirical testing showed that the
> link becomes unstable around a raw value of 8.
>
> The SQI raw value remains zero if no data is received, even if noise is
> present. This confirms that the measurement reflects the "quality" during
> active data reception rather than the passive line state. User space
> must ensure that traffic is present on the link to obtain valid SQI
> readings.
Update for this statement: it is valid only if EEE is active. With
disabled EEE, SQI provide correct value even if no data is transferred.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists