[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220429115807.2198448-1-tee.min.tan@linux.intel.com>
Date: Fri, 29 Apr 2022 19:58:07 +0800
From: Tan Tee Min <tee.min.tan@...ux.intel.com>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
Wong Vee Khee <vee.khee.wong@...ux.intel.com>,
Tan Tee Min <tee.min.tan@...ux.intel.com>,
Ling Pei Lee <pei.lee.ling@...el.com>,
Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Matthew Hagan <mnhagan88@...il.com>,
Kurt Kanzenbach <kurt@...utronix.de>
Cc: netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Voon Wei Feng <weifeng.voon@...el.com>,
Song Yoong Siang <yoong.siang.song@...el.com>,
Ong@...r.kernel.org, Boon Leong <boon.leong.ong@...el.com>,
Tan Tee Min <tee.min.tan@...el.com>,
Looi Hong Aun <hong.aun.looi@...el.com>
Subject: [PATCH net v2 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms
Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation
of Split Header (SPH) feature is not supported for Ipv4 fragmented packet.
This SPH limitation will cause ping failure when the packets size exceed
the MTU size. For example, the issue happens once the basic ping packet
size is larger than the configured MTU size and the data is lost inside
the fragmented packet, replaced by zeros/corrupted values, and leads to
ping fail.
So, disable the Split Header for Intel platforms.
v2: Add fixes tag in commit message.
Fixes: 67afd6d1cfdf("net: stmmac: Add Split Header support and enable it
in XGMAC cores")
Cc: <stable@...r.kernel.org> # 5.10.x
Suggested-by: Ong, Boon Leong <boon.leong.ong@...el.com>
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@...el.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
Signed-off-by: Tan Tee Min <tee.min.tan@...ux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
include/linux/stmmac.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 63754a9c4ba7..0b0be0898ac5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
plat->has_gmac4 = 1;
plat->force_sf_dma_mode = 0;
plat->tso_en = 1;
+ plat->sph_disable = 1;
/* Multiplying factor to the clk_eee_i clock time
* period to make it closer to 100 ns. This value
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4a4b3651ab3e..2525a80353b7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device,
dev_info(priv->device, "TSO feature enabled\n");
}
- if (priv->dma_cap.sphen) {
+ if (priv->dma_cap.sphen && !priv->plat->sph_disable) {
ndev->hw_features |= NETIF_F_GRO;
priv->sph_cap = true;
priv->sph = priv->sph_cap;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 24eea1b05ca2..29917850f079 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -270,5 +270,6 @@ struct plat_stmmacenet_data {
int msi_rx_base_vec;
int msi_tx_base_vec;
bool use_phy_wol;
+ bool sph_disable;
};
#endif
--
2.25.1
Powered by blists - more mailing lists