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 DD3C6253340; Mon, 23 Jun 2025 13:39:28 +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=1750685969; cv=none; b=T6K/W7fck7FrJA4dGD0ubFg7UE3362rU7mJZ5TDlhaWEzOGaHV5//3bBmS+viCJs6PhGAm/4pAeNnsLWcNAP1lkwsIMV9tBuKUkZR0RAUBR4N885mAMI6NG1geKNA+V8MU8xGcdSuKCDaH34cJKRIaf35qTsMwkwdl7mP4naW8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685969; c=relaxed/simple; bh=kLpPKFCub7HbLf5mlmxtx4fl2u98inDsqqPORiKukZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iceEVOSydoZiZkeACE5BEYMBp46IBjouVp52eLjoZmvJtaTp2DWSF6hPGn+0crlq3PEdOd5nhg2PoDR8PjAuzxN8c0rX6cKV/GEPxOTzkoaxGF/B0kuSpUR64ftPqlJ67B4ajHcMbwHcVkbNHeZFtm+cuAfvCSl0R34FmCznnaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vAC/y3Lt; 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="vAC/y3Lt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71F75C4CEEA; Mon, 23 Jun 2025 13:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750685968; bh=kLpPKFCub7HbLf5mlmxtx4fl2u98inDsqqPORiKukZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vAC/y3LtAbi7AiDgicOb/ofcBzOkPByDRX6d9/e1b32jqiLEK3xOpwe4fjqKbyEnN V1GJIC0qebkZEpfXn+y+PGeqoa7nAuGlGnY3gPXSJeYemenPwztW0TL/9ZQ4nX+G76 PjfBbauvbmq83Q+i5ScKgNbvesApkz5Var4UEaVc= 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 5.15 072/411] net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames Date: Mon, 23 Jun 2025 15:03:36 +0200 Message-ID: <20250623130635.169282470@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130632.993849527@linuxfoundation.org> References: <20250623130632.993849527@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 5.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 edb951695b13e..7a3a8cce02d3d 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -943,7 +943,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