Re: [PATCH net-next v8 1/3] net: dsa: microchip: implement KSZ87xx Module 3 low-loss cable errata
From: Nicolai Buchwitz <hidden>
Date: 2026-06-01 13:40:13
Also in:
lkml
Hi Fidelio On 1.6.2026 13:54, Fidelio Lawson wrote:
Implement the KSZ87xx short cable workaround. This patch implements the KSZ87xx short cable erratum described in Microchip document DS80000687C for KSZ87xx switches and the following support article: Link: https://support.microchip.com/s/article/Solution-for-Using-CAT-5E-or-CAT-6-Short-Cable-with-a-Link-Issue-for-the-KSZ8795-Family The issue affects short or low-loss cable links (e.g. CAT5e/CAT6), where the PHY receiver equalizer may amplify high-amplitude signals excessively, resulting in internal distortion and link establishment failures. KSZ87xx devices require a workaround for the Module 3 low-loss cable condition, controlled through the switch TABLE_LINK_MD_V indirect registers. This change models the erratum handling as vendor-specific Clause 22 PHY registers, virtualized by the KSZ8 DSA driver and accessed via ksz8_r_phy() / ksz8_w_phy(). The following controls are provided: - A boolean “short-cable” preset, which applies a documented and conservative configuration (LPF 62 MHz bandwidth and DSP EQ initial value 0), and is the recommended interface for typical use cases. - Separate LPF bandwidth and DSP EQ initial value controls intended for advanced or experimental tuning. These are orthogonal and independent, and override the corresponding settings without requiring any specific ordering. The preset and tunables act as simple setters with no implicit state machine or invalid combinations, keeping the API predictable and aligned with the KISS principle. The erratum affects the shared PHY analog front-end and therefore applies globally to the switch. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Do we need/want a Fixes: tag for a net-next patch? AFAIU the only thing actually fixed is the TABLE_LINK_MD vs TABLE_LINK_MD_V macro, and that macro was not referenced anywhere before this patch.
quoted hunk ↗ jump to hunk
Signed-off-by: Fidelio Lawson <redacted> --- drivers/net/dsa/microchip/ksz8.c | 89 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz8_reg.h | 23 ++++++++- drivers/net/dsa/microchip/ksz_common.h | 4 ++ 3 files changed, 115 insertions(+), 1 deletion(-)diff --git a/drivers/net/dsa/microchip/ksz8.cb/drivers/net/dsa/microchip/ksz8.c index 0f84b2e7d25d..b8a7b9004142 100644--- a/drivers/net/dsa/microchip/ksz8.c +++ b/drivers/net/dsa/microchip/ksz8.c
[...]
quoted hunk ↗ jump to hunk
@@ -2070,6 +2155,10 @@ static int ksz8_setup(struct dsa_switch *ds) return ret; } + /* Initialize KS87xx short-cable preset control */
Should be KSZ87xx.
[...]
Besides from the above: Reviewed-by: Nicolai Buchwitz <redacted> Thanks Nicolai