]> git.dujemihanovic.xyz Git - linux.git/commit
net: sparx5: Fix invalid timestamps
authorAakash Menon <aakash.r.menon@gmail.com>
Tue, 17 Sep 2024 05:18:29 +0000 (22:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Sep 2024 18:53:19 +0000 (19:53 +0100)
commit151ac45348afc5b56baa584c7cd4876addf461ff
tree48f7bb9735790c65018430669773e9ce24ff7c37
parent9410645520e9b820069761f3450ef6661418e279
net: sparx5: Fix invalid timestamps

Bit 270-271 are occasionally unexpectedly set by the hardware. This issue
was observed with 10G SFPs causing huge time errors (> 30ms) in PTP. Only
30 bits are needed for the nanosecond part of the timestamp, clear 2 most
significant bits before extracting timestamp from the internal frame
header.

Fixes: 70dfe25cd866 ("net: sparx5: Update extraction/injection for timestamping")
Signed-off-by: Aakash Menon <aakash.menon@protempis.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/sparx5/sparx5_packet.c