提交 47f753c1 编写于 作者: T Tan Tee Min 提交者: David S. Miller

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: 67afd6d1("net: stmmac: Add Split Header support and enable it in XGMAC cores")
Cc: <stable@vger.kernel.org> # 5.10.x
Suggested-by: NOng, Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: NMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: NWong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: NTan Tee Min <tee.min.tan@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a9384a4c
...@@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, ...@@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
plat->has_gmac4 = 1; plat->has_gmac4 = 1;
plat->force_sf_dma_mode = 0; plat->force_sf_dma_mode = 0;
plat->tso_en = 1; plat->tso_en = 1;
plat->sph_disable = 1;
/* Multiplying factor to the clk_eee_i clock time /* Multiplying factor to the clk_eee_i clock time
* period to make it closer to 100 ns. This value * period to make it closer to 100 ns. This value
......
...@@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device, ...@@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device,
dev_info(priv->device, "TSO feature enabled\n"); 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; ndev->hw_features |= NETIF_F_GRO;
priv->sph_cap = true; priv->sph_cap = true;
priv->sph = priv->sph_cap; priv->sph = priv->sph_cap;
......
...@@ -270,5 +270,6 @@ struct plat_stmmacenet_data { ...@@ -270,5 +270,6 @@ struct plat_stmmacenet_data {
int msi_rx_base_vec; int msi_rx_base_vec;
int msi_tx_base_vec; int msi_tx_base_vec;
bool use_phy_wol; bool use_phy_wol;
bool sph_disable;
}; };
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册