[PATCH net 1/2] net: stmmac: fix dwmac1000 ptp timestamp status offset

Alexis Lothoré alexis.lothore at bootlin.com
Tue Apr 22 09:11:18 PDT 2025


Hi Maxime,

On Tue Apr 22, 2025 at 5:49 PM CEST, Maxime Chevallier wrote:
> Hi Alexis,
>
> On Tue, 22 Apr 2025 17:07:22 +0200
> Alexis Lothore <alexis.lothore at bootlin.com> wrote:
>
>> When a PTP interrupt occurs, the driver accesses the wrong offset to
>> learn about the number of available snapshots in the FIFO for dwmac1000:
>> it should be accessing bits 29..25, while it is currently reading bits
>> 19..16 (those are bits about the auxiliary triggers which have generated
>> the timestamps). As a consequence, it does not compute correctly the
>> number of available snapshots, and so possibly do not generate the
>> corresponding clock events if the bogus value ends up being 0.
>> 
>> Fix clock events generation by reading the correct bits in the timestamp
>> register for dwmac1000.
>> 
>> Fixes: 19b93bbb20eb ("net: stmmac: Introduce dwmac1000 timestamping operations")
>
> Looks like the commit hash is wrong, should be :
>
> 477c3e1f6363 ("net: stmmac: Introduce dwmac1000 timestamping operations")

Yes, you are absolutely right, I wrongly picked this hash from a custom
branch rather than a stable branch -_- Thanks for spotting this, will be
fixed in v2.

>
> Other than that I agree with the change, these offset are the right
> ones, thanks...
>
> With the Fixes tag fixed,
>
> Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>

Thanks,

Alexis




-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




More information about the linux-arm-kernel mailing list