R: [PATCH net] net: dsa: mv88e6xxx: continue without PTP if the TAI period is invalid
From: Nicolò Giuliani - nicolo.giuliani6@studio.unibo.it
Date: Sun Sep 20 2026 - 13:34:24 EST
Hi Andrew,
> The point of the failure is to indicate an assumption in the driver is
> not valid, and we need to examine the assumption.
You are right, and my patch only works around it.
> What does the datasheet for the 88E6193X say about this register? Has
> its meaning changed? Marvell like moving registers around, is it
> somewhere else?
I do not have the datasheet for this chip, so I cannot answer that from documentation. What I can say from the board: the read of MV88E6XXX_TAI_CLOCK_PERIOD in mv88e6xxx_cc_coeff_get() returns 0 at probe on this 88E6193X, both when the boot loader has reset the switch and when the driver has. The vendor firmware drives the switch from user space, so I do not know whether it programs this register.
Before I send anything again I will read the register at other points (right after a hardware reset, before and after the PTP block is enabled) and check how the other 6390 family entries in the driver get their TAI period, then report what I find in this thread. If the period has to be programmed on this family, that is a different patch, and I will drop this one.
Thanks,
Nicolo Giuliani
________________________________________
Da: Andrew Lunn <andrew@xxxxxxx>
Inviato: domenica 20 settembre 2026 16:48
A: Nicolò Giuliani - nicolo.giuliani6@xxxxxxxxxxxxxxx
Cc: Vladimir Oltean; David S. Miller; Eric Dumazet; Jakub Kicinski; Paolo Abeni; Richard Cochran; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Oggetto: Re: [PATCH net] net: dsa: mv88e6xxx: continue without PTP if the TAI period is invalid
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