Skip to content

Commit 47f753c

Browse files
Tan Tee Mindavem330
authored andcommitted
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: 67afd6d("net: stmmac: Add Split Header support and enable it in XGMAC cores") Cc: <[email protected]> # 5.10.x Suggested-by: Ong, Boon Leong <[email protected]> Signed-off-by: Mohammad Athari Bin Ismail <[email protected]> Signed-off-by: Wong Vee Khee <[email protected]> Signed-off-by: Tan Tee Min <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a9384a4 commit 47f753c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
454454
plat->has_gmac4 = 1;
455455
plat->force_sf_dma_mode = 0;
456456
plat->tso_en = 1;
457+
plat->sph_disable = 1;
457458

458459
/* Multiplying factor to the clk_eee_i clock time
459460
* period to make it closer to 100 ns. This value

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device,
70217021
dev_info(priv->device, "TSO feature enabled\n");
70227022
}
70237023

7024-
if (priv->dma_cap.sphen) {
7024+
if (priv->dma_cap.sphen && !priv->plat->sph_disable) {
70257025
ndev->hw_features |= NETIF_F_GRO;
70267026
priv->sph_cap = true;
70277027
priv->sph = priv->sph_cap;

include/linux/stmmac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,6 @@ struct plat_stmmacenet_data {
270270
int msi_rx_base_vec;
271271
int msi_tx_base_vec;
272272
bool use_phy_wol;
273+
bool sph_disable;
273274
};
274275
#endif

0 commit comments

Comments
 (0)