* FAILED: patch "[PATCH] net: stmmac: dwmac1000: stop hardware from dropping" failed to apply to 6.18-stable tree
@ 2026-12-02 13:49 gregkh
2026-12-04 5:08 ` [PATCH 6.18.y] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2026-12-02 13:49 UTC (permalink / raw)
To: opensource, maxime.chevallier, pabeni, stable; +Cc: stable
The patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 2dd48c4615a67ebb1762c2b0d79801be1949fcfb
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026120251-removable-backrest-2b6a@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2dd48c4615a67ebb1762c2b0d79801be1949fcfb Mon Sep 17 00:00:00 2001
From: Christian Schmidbauer <opensource@grische.xyz>
Date: Sat, 14 Nov 2026 14:36:39 +0100
Subject: [PATCH] net: stmmac: dwmac1000: stop hardware from dropping
checksum-error packets
When the checksum offload engine (CoE) is enabled, the dwmac1000 MAC
silently drops any frame for which the engine detects a checksum error,
before the driver sees it.
This breaks VXLAN over IPv6 with zero UDP checksums, which RFC 6935 and
RFC 6936 allow for tunnels.
Set DMA_CONTROL_DT so that such frames are delivered instead of dropped,
as commit fe4042797651 ("net: stmmac: dwmac4: stop hardware from
dropping checksum-error packets") did for dwmac4. CoE remains enabled,
so the driver still sees the error status and marks the skb
CHECKSUM_NONE for the stack to verify.
Set the bit only with enhanced descriptors. The normal descriptor parser
does not report a checksum-only error to the stack, so cores that use
it keep dropping such frames in hardware anyway.
Tested on an Aruba AP-325 (ipq806x-gmac-dwmac) with Rx checksum offload
on.
Link: https://lore.kernel.org/all/20250625132117.1b3264e8@kernel.org/
Link: https://github.com/freifunk-gluon/gluon/issues/3783
Fixes: 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers.")
Cc: <stable@vger.kernel.org> # 6.6.x: ee0aace5f844: net: stmmac: Correctly handle Rx checksum offload errors
Cc: <stable@vger.kernel.org> # 6.6.x
Signed-off-by: Christian Schmidbauer <opensource@grische.xyz>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261114133640.3285413-4-opensource@grische.xyz
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 1de1f929d61c..55d9c39287f1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -162,7 +162,7 @@ enum rx_tx_priority_ratio {
/* DMA CRS Control and Status Register Mapping */
/* DMA operation mode defines (start/stop tx/rx are placed in common header)*/
-/* Disable Drop TCP/IP csum error */
+#define DMA_CONTROL_DT 0x04000000 /* Disable Drop of TCP/IP csum errors */
#define DMA_CONTROL_RSF 0x02000000 /* Receive Store and Forward */
#define DMA_CONTROL_DFF 0x01000000 /* Disaable flushing */
/* Threshold for Activating the FC */
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index 3ac7a7949529..31d5f79ef560 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -15,6 +15,7 @@
#include <linux/io.h>
#include "dwmac1000.h"
#include "dwmac_dma.h"
+#include "stmmac.h"
static void dwmac1000_dma_axi(void __iomem *ioaddr, struct stmmac_axi *axi)
{
@@ -129,6 +130,13 @@ static void dwmac1000_dma_operation_mode_rx(struct stmmac_priv *priv,
{
u32 csr6 = readl(ioaddr + DMA_CHAN_CONTROL(channel));
+ /* Deliver checksum-error frames only with enhanced
+ * descriptors, because the normal descriptor parser does not
+ * report a checksum-only error.
+ */
+ if (priv->plat->enh_desc)
+ csr6 |= DMA_CONTROL_DT;
+
if (mode == SF_DMA_MODE) {
pr_debug("GMAC: enable RX store and forward mode\n");
csr6 |= DMA_CONTROL_RSF | DMA_CONTROL_DFF;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 6.18.y] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets
2026-12-02 13:49 FAILED: patch "[PATCH] net: stmmac: dwmac1000: stop hardware from dropping" failed to apply to 6.18-stable tree gregkh
@ 2026-12-04 5:08 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-12-04 5:08 UTC (permalink / raw)
To: stable; +Cc: Christian Schmidbauer, Maxime Chevallier, Paolo Abeni,
Sasha Levin
From: Christian Schmidbauer <opensource@grische.xyz>
[ Upstream commit 2dd48c4615a67ebb1762c2b0d79801be1949fcfb ]
When the checksum offload engine (CoE) is enabled, the dwmac1000 MAC
silently drops any frame for which the engine detects a checksum error,
before the driver sees it.
This breaks VXLAN over IPv6 with zero UDP checksums, which RFC 6935 and
RFC 6936 allow for tunnels.
Set DMA_CONTROL_DT so that such frames are delivered instead of dropped,
as commit fe4042797651 ("net: stmmac: dwmac4: stop hardware from
dropping checksum-error packets") did for dwmac4. CoE remains enabled,
so the driver still sees the error status and marks the skb
CHECKSUM_NONE for the stack to verify.
Set the bit only with enhanced descriptors. The normal descriptor parser
does not report a checksum-only error to the stack, so cores that use
it keep dropping such frames in hardware anyway.
Tested on an Aruba AP-325 (ipq806x-gmac-dwmac) with Rx checksum offload
on.
Link: https://lore.kernel.org/all/20250625132117.1b3264e8@kernel.org/
Link: https://github.com/freifunk-gluon/gluon/issues/3783
Fixes: 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers.")
Cc: <stable@vger.kernel.org> # 6.6.x: ee0aace5f844: net: stmmac: Correctly handle Rx checksum offload errors
Cc: <stable@vger.kernel.org> # 6.6.x
Signed-off-by: Christian Schmidbauer <opensource@grische.xyz>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261114133640.3285413-4-opensource@grische.xyz
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ sashal: Adjusted the header hunk for the existing two-line DMA_CONTROL_DT comment and define, and the C context line has csr6 |= DMA_CONTROL_RSF; without DMA_CONTROL_DFF. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 3 +--
drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 8 ++++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 12c82235c1d7e..604a2034c111c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -206,8 +206,7 @@ enum rx_tx_priority_ratio {
#define DMA_BUS_FB 0x00010000 /* Fixed Burst */
/* DMA operation mode defines (start/stop tx/rx are placed in common header)*/
-/* Disable Drop TCP/IP csum error */
-#define DMA_CONTROL_DT 0x04000000
+#define DMA_CONTROL_DT 0x04000000 /* Disable Drop of TCP/IP csum errors */
#define DMA_CONTROL_RSF 0x02000000 /* Receive Store and Forward */
#define DMA_CONTROL_DFF 0x01000000 /* Disaable flushing */
/* Threshold for Activating the FC */
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index cacbf6d4365c7..7033212af8a53 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -15,6 +15,7 @@
#include <linux/io.h>
#include "dwmac1000.h"
#include "dwmac_dma.h"
+#include "stmmac.h"
static void dwmac1000_dma_axi(void __iomem *ioaddr, struct stmmac_axi *axi)
{
@@ -153,6 +154,13 @@ static void dwmac1000_dma_operation_mode_rx(struct stmmac_priv *priv,
{
u32 csr6 = readl(ioaddr + DMA_CHAN_CONTROL(channel));
+ /* Deliver checksum-error frames only with enhanced
+ * descriptors, because the normal descriptor parser does not
+ * report a checksum-only error.
+ */
+ if (priv->plat->enh_desc)
+ csr6 |= DMA_CONTROL_DT;
+
if (mode == SF_DMA_MODE) {
pr_debug("GMAC: enable RX store and forward mode\n");
csr6 |= DMA_CONTROL_RSF;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 5:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 13:49 FAILED: patch "[PATCH] net: stmmac: dwmac1000: stop hardware from dropping" failed to apply to 6.18-stable tree gregkh
2026-12-04 5:08 ` [PATCH 6.18.y] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox