]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Fri, 23 May 2025 08:27:16 +0000 (10:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:14 +0000 (11:05 +0100)
commit92dd2d870e7b63efa210d1513d89dd5152bb83e2
treefb52264f1149a39363ddaca8bfccf3dd02a0fbbe
parentad17eb86d042d72a59fd184ad1adf34f5eb36843
net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames

[ Upstream commit 57a92d14659df3e7e7e0052358c8cc68bbbc3b5e ]

We have noticed that when PHY timestamping is enabled, L2 frames seems
to be modified by changing two 2 bytes with a value of 0. The place were
these 2 bytes seems to be random(or I couldn't find a pattern).  In most
of the cases the userspace can ignore these frames but if for example
those 2 bytes are in the correction field there is nothing to do.  This
seems to happen when configuring the HW for IPv4 even that the flow is
not enabled.
These 2 bytes correspond to the UDPv4 checksum and once we don't enable
clearing the checksum when using L2 frames then the frame doesn't seem
to be changed anymore.

Fixes: 7d272e63e0979d ("net: phy: mscc: timestamping and PHC support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://patch.msgid.link/20250523082716.2935895-1-horatiu.vultur@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/mscc/mscc_ptp.c