Re: [PATCH net] net: dsa: mv88e6xxx: continue without PTP if the TAI period is invalid

From: Andrew Lunn

Date: Sun Sep 20 2026 - 10:49:02 EST


On Sat, Sep 19, 2026 at 09:52:07PM +0200, Nicolo Giuliani via B4 Relay wrote:
> From: Nicolo Giuliani <nicolo.giuliani6@xxxxxxxxxxxxxxx>
>
> Since commit 7e3c18097a70 ("net: dsa: mv88e6xxx: read cycle counter
> period from hardware"), mv88e6xxx_ptp_setup() reads the TAI clock period
> register and fails with -ENODEV if the value is not one of the supported
> periods. mv88e6xxx_setup() propagates the error, so the switch does not
> probe at all, although it is fully usable without PTP. Before that commit
> the register was not read and the probe did not depend on its value.

The point of the failure is to indicate an assumption in the driver is
not valid, and we need to examine the assumption.

>
> The 88E6193X on the Sophos XGS 107w reads 0 in that register, so its
> probe fails with:
>
> mv88e6xxx ...: unexpected cycle counter period of 0 ps

So the assumption is, all devices have valid values here. So the
correct fix is to refine the assumption. What does the datasheet for
the 88E6193X say about this register? Has its meaning changed? Marvell
like moving registers around, is it somewhere else?

Andrew

---
pw-bot: cr