From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 C784B3502A8; Wed, 30 Sep 2026 19:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790794984; cv=none; b=EZYuvKp0VXTV9yhAMtQdHwRX4p/TCrzyOu7+sPdNH4XALghILcwpNTJQ5FsgF5hz5Cjfi4nD9uHD1DH7l3Yv7GxoqLPhcr9M6qqSze1LKP9zA+RUzwELrtZTgZxz68W+7md7QYvJqW3SIgum62nGsaWqi6Mt+YfBB8QSEEuskrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790794984; c=relaxed/simple; bh=ooYIyIFKEoU0C6O26DAYlEelCmDEx9YaqV1whJ6uxqs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NxRzmGizxd8b1gR3h7jJUWkxIoq4p9SPzic4gsJL8FrQst4hN8NXFYi9NwA7YjPK0b43ht7DYy77HgT8RwTCAPcvOPcq/0yj7+10+o7NqNa68KfHlCBSoAzq15VxQ7ecy+9899L9lkl8MfldLNGmFZbgcJcSboXB75ZUpsMO4yI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CQN2tnAA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CQN2tnAA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA3A61F000FF; Wed, 30 Sep 2026 19:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790794983; bh=EVS04Wwy3b5+VpyyDTDxXBSNIePVjZWd2WnJqmfiDTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CQN2tnAAsN4gYXiAXJZG4MMcZxtCOSx+IOhM/DiXaD54FqsmvmOdEpyKSrnLVIdIJ 2yueIbNtHv2OGFNh34V9FCCLRZeE0cBvGKTLNtRMrN6Hbvhq7vrW1OMaBZxOegwhGj f23jACVLqhtQGtsZf8iprK63VnRBcVDf3nXb6QuM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, James Nugraha , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 0401/1193] net: amd-xgbe: discard rx packets with bad FCS Date: Wed, 30 Sep 2026 17:18:05 +0200 Message-ID: <20260930152443.104552709@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Nugraha [ Upstream commit ac8d6b28d48c5d951dcd923d33e461588e762a6d ] amd-xgbe driver currently sets the MAC_RCR.DCRCC bit whenever RX is enabled. This disables hardware FCS validation, causing packets with bad FCS to be accepted unconditionally. This change unsets DCRCC so that packets with bad FCS will be dropped, in-line with typical behaviours of many other network controllers. Tests: - Verified that packets with bad FCS are now dropped. - Verified that receiving packets with bad FCS will increment the `rx_crc_errors` counter. Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver") Signed-off-by: James Nugraha Link: https://patch.msgid.link/20260827232220.69907-1-aslan.jnn@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c index f1b0fb02b3cd1..811c817a2efc7 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c @@ -3438,7 +3438,7 @@ static void xgbe_enable_rx(struct xgbe_prv_data *pdata) XGMAC_IOWRITE(pdata, MAC_RQC0R, reg_val); /* Enable MAC Rx */ - XGMAC_IOWRITE_BITS(pdata, MAC_RCR, DCRCC, 1); + XGMAC_IOWRITE_BITS(pdata, MAC_RCR, DCRCC, 0); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, CST, 1); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, ACS, 1); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, RE, 1); @@ -3449,7 +3449,6 @@ static void xgbe_disable_rx(struct xgbe_prv_data *pdata) unsigned int i; /* Disable MAC Rx */ - XGMAC_IOWRITE_BITS(pdata, MAC_RCR, DCRCC, 0); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, CST, 0); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, ACS, 0); XGMAC_IOWRITE_BITS(pdata, MAC_RCR, RE, 0); -- 2.53.0