Re: [PATCH 3/3] net: dsa: microchip: implement KSZ87xx Module 3 low-loss cable errata
From: Fidelio LAWSON
Date: Fri Apr 03 2026 - 05:45:18 EST
On 3/26/26 13:18, Andrew Lunn wrote:
+ mutex_lock(&dev->alu_mutex);
+
+ ret = ksz_write8(dev, regs[REG_IND_CTRL_0], 0xA0);
+
+ if (!ret)
+ ret = ksz_write8(dev, 0x6F, indir_reg);
+
+ if (!ret)
+ ret = ksz_write8(dev, regs[REG_IND_BYTE], indir_val);
+
+ mutex_unlock(&dev->alu_mutex);
What address space are these registers in? Normally workarounds for a
PHY would be in the PHY driver. But that assumes the registers are
accessible from the PHY driver.
Andrew
Hi Andrew,
These registers belong to the KSZ87xx switch address space, accessed through the switch’s indirect access mechanism. In particular, the offsets used here correspond to entries within the TABLE_LINK_MD_V indirect table of the KSZ8-family switches.
In the next revision I will switch to using ksz8_ind_write8(), and I will also replace the remaining magic values with proper register macros.
Best regards,
Fidelio