From: Jakub Kicinski Date: Thu, 11 Jun 2026 22:47:58 +0000 (-0700) Subject: Merge branch 'ksz87xx-add-support-for-low-loss-cable-equalizer-errata' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9bcf842b39a09308e971d3426ea43e9ebaa7d2b;p=thirdparty%2Flinux.git Merge branch 'ksz87xx-add-support-for-low-loss-cable-equalizer-errata' Fidelio Lawson says: ==================== ksz87xx: add support for low-loss cable equalizer errata 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 According to the erratum, the embedded PHY receiver in KSZ87xx switches is tuned by default for long, high-loss Ethernet cables. When operating with short or low-loss cables (for example CAT5e or CAT6), the PHY equalizer may over-amplify the incoming signal, leading to internal distortion and link establishment failures. Microchip documents two independent mechanisms to mitigate this issue: adjusting the receiver low‑pass filter bandwidth and reducing the DSP equalizer initial value. These registers are located in the switch’s internal LinkMD table and cannot be accessed directly through a stand‑alone PHY driver. To keep the PHY‑facing API clean, this series models the erratum handling as vendor‑specific Clause 22 PHY registers, virtualized by the KSZ8 DSA driver. Accesses are intercepted by ksz8_r_phy() / ksz8_w_phy() and translated into the appropriate indirect LinkMD register writes. The erratum affects the shared PHY analog front‑end and therefore applies globally to the switch. Based on review feedback, the user‑visible interface is kept deliberately simple and predictable: - A boolean “short‑cable” PHY tunable applies a documented and conservative preset (LPF bandwidth 62MHz, DSP EQ initial value 0). This is the recommended KISS interface for the common short‑cable scenario. - Two additional integer PHY tunables allow advanced or experimental tuning of the LPF bandwidth and the DSP EQ initial value. These controls are orthogonal, have no ordering requirements, and simply override the corresponding setting when written. The tunables act as simple setters with no implicit state machine or invalid combinations, avoiding surprises for userspace and not relying on extended error reporting or netlink ethtool support. This series contains: 1. Support for the KSZ87xx low‑loss cable erratum in the KSZ8 DSA driver, including the short‑cable preset and orthogonal tuning controls. 2. Addition of vendor‑specific PHY tunable identifiers for the short‑cable preset, LPF bandwidth, and DSP EQ initial value. 3. Exposure of these tunables through the Micrel PHY driver via get_tunable / set_tunable callbacks. This version follows the design agreed upon during v3 review and reworks the interface accordingly. ==================== Link: https://patch.msgid.link/20260609-ksz87xx_errata_low_loss_connections-v10-0-9ba4418cf3db@exotec.com Signed-off-by: Jakub Kicinski --- e9bcf842b39a09308e971d3426ea43e9ebaa7d2b