Skip to content
Commit 73fa4597 authored by Alexis Lothore's avatar Alexis Lothore Committed by Paolo Abeni
Browse files

net: stmmac: fix dwmac1000 ptp timestamp status offset



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: 477c3e1f ("net: stmmac: Introduce dwmac1000 timestamping operations")
Signed-off-by: default avatarAlexis Lothoré <alexis.lothore@bootlin.com>
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250423-stmmac_ts-v2-1-e2cf2bbd61b1@bootlin.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 607b310a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment