Re: [PATCH net-next v7 1/3] net: dsa: microchip: implement KSZ87xx Module 3 low-loss cable errata

From: Fidelio LAWSON

Date: Mon Jun 01 2026 - 06:46:40 EST


Hi Nicolai,

Thanks again for the detailed testing and feedback.

On 5/28/26 13:43, Nicolai Buchwitz wrote:

The cached state lives on struct ksz_device, but ksz8_r_phy() is
invoked per port. Setting the preset on one port is reported back as
active on the others:

  phytool write swp1/1/0x1a 1
  phytool read  swp1/2/0x1a -> 0x0001
  phytool read  swp1/3/0x1a -> 0x0001

The commit message already notes that the erratum applies switch-wide.
So writes from non-primary ports could either be rejected or at least produce
a dev_info_once() so userspace can see the setting is shared?


I will add a dev_info_once() to inform userspace that the configuration is shared across all ports.

dev->eq_init starts at zero from the kzalloc, but the header added by
this patch defines KSZ87XX_DSP_EQ_INIT_FACTORY = 0x0F as the hardware
default. After a fresh boot on my setup (no writes), the read returns 0:

  phytool read swp1/1/0x1c -> 0x0000

Should probe set dev->eq_init = KSZ87XX_DSP_EQ_INIT_FACTORY (and
dev->lpf_bw = KSZ87XX_PHY_LPF_90MHZ), or read the indirect registers
once on probe, so the cache reflects what the hardware actually holds?

Good point, I will fix this by setting dev->eq_init = KSZ87XX_DSP_EQ_INIT_FACTORY and dev->lpf_bw = KSZ87XX_PHY_LPF_90MHZ during probe.

Thanks,
Fidelio