]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: stmmac: disable Split Header (SPH) for Intel platforms
authorTan Tee Min <tee.min.tan@linux.intel.com>
Fri, 29 Apr 2022 11:58:07 +0000 (19:58 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:23:11 +0000 (14:23 +0200)
BugLink: https://bugs.launchpad.net/bugs/1978240
commit 47f753c1108e287edb3e27fad8a7511a9d55578e upstream.

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@vger.kernel.org> # 5.10.x
Suggested-by: Ong, Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
include/linux/stmmac.h

index 8e8778cfbbaddbddec6d3170894ed021fe2a6d58..6f87e296a410f857526fd04aeb3962ab49457889 100644 (file)
@@ -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
index 9376c4e2862687fc42635ddcf884fb3938682606..9c1e19ea6fcd011ebf260b5dfa2442edd4b79939 100644 (file)
@@ -7081,7 +7081,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;
index 1450397fc0bcdb785d4f3bc141f60d2432a59ef0..48d015ed217525de7009ec3f7acac6dc776f2c8c 100644 (file)
@@ -269,5 +269,6 @@ struct plat_stmmacenet_data {
        int msi_rx_base_vec;
        int msi_tx_base_vec;
        bool use_phy_wol;
+       bool sph_disable;
 };
 #endif