From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92A392EE5FD; Tue, 17 Jun 2025 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177623; cv=none; b=FX0p3nWnHWE30VwUEC3XFqTOnP3k/aKnng/oLNoqhRFcgfrMukkJK/6ZkI4XkAywPBuAP/2T9Nw36Ow1Rt+mKx0fs0MU0og4+ZWdbifspNA/TTHucwlgZfJExFUyuxoXwu7oE/1kw5OAKGU1ZLBBC8NcVIdK5qvxHiyyMg/4t1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177623; c=relaxed/simple; bh=N6MrBABJWcqIeC5vGF93OyczJow1eXYDYj1Uwe1a70M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p+rEUpR+f0hqP4PBUt9G8EBJvGF+fNZ0CxgldNd5E15yLCcPF8F6XSy8AyiIWh8z0ELOMYl4QmAML1wbwriSbvAEhrHvaWgmxq7r3vB93qfXgHrRY13E/gEESWtLxRgRqf1j0HOxSVzm5OWApQUWVT1tsFomZvKolZlxk0X0RQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=n+ZZwzdf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="n+ZZwzdf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0241CC4CEE7; Tue, 17 Jun 2025 16:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750177623; bh=N6MrBABJWcqIeC5vGF93OyczJow1eXYDYj1Uwe1a70M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n+ZZwzdfVe5mJpPpQOMgmI4vuDjM4nqbG8fUTzEW2RkiXrsk26NnADNRr7Sud/9R2 ITobJHpWMu2RX7slTirjFnohrs99DwCYp7tny6+bNPrMIRMFY3Jo0ipKLZvsVpRqy9 eE085Eo7uHpOLT1dBdDeXaOT4bZ4gZ6O4dOr3dSY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Horatiu Vultur , Paolo Abeni , Sasha Levin Subject: [PATCH 6.15 337/780] net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames Date: Tue, 17 Jun 2025 17:20:45 +0200 Message-ID: <20250617152505.177148062@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152451.485330293@linuxfoundation.org> References: <20250617152451.485330293@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Horatiu Vultur [ 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 Link: https://patch.msgid.link/20250523082716.2935895-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/phy/mscc/mscc_ptp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index 6f96f2679f0bf..6b800081eed52 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -946,7 +946,9 @@ static int vsc85xx_ip1_conf(struct phy_device *phydev, enum ts_blk blk, /* UDP checksum offset in IPv4 packet * according to: https://tools.ietf.org/html/rfc768 */ - val |= IP1_NXT_PROT_UDP_CHKSUM_OFF(26) | IP1_NXT_PROT_UDP_CHKSUM_CLEAR; + val |= IP1_NXT_PROT_UDP_CHKSUM_OFF(26); + if (enable) + val |= IP1_NXT_PROT_UDP_CHKSUM_CLEAR; vsc85xx_ts_write_csr(phydev, blk, MSCC_ANA_IP1_NXT_PROT_UDP_CHKSUM, val); -- 2.39.5