Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6010750iob; Tue, 10 May 2022 08:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXcND1KHhRslML8l9AVrMNPZbl8fASpAN65s/aPPpUBdNgt9Ahxu0GNhWxWW3TA7UrVuqA X-Received: by 2002:a63:9d06:0:b0:3c1:5f7e:8e66 with SMTP id i6-20020a639d06000000b003c15f7e8e66mr17439778pgd.538.1652196305933; Tue, 10 May 2022 08:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652196305; cv=none; d=google.com; s=arc-20160816; b=E+vL1dAy+WCqWn5InctnyU9R/tZG4hgYTA5rSDnfzBXNz0j2i3JofLRH4pH2FMvftR DzyV6ouerP/TUX7NaAvQsD72gReLh80g6mpCeIfuyCObPLqtYIeXZGHoewqmw33OO34D hoTDvPsKV1ECBX2Qp/FhumWr08WvevI7QKuafpUO55p3J00IOFGRZut/TpSiq6K5Ypwr l52m0OB6kgzb/GmwYWxJMaA6H5x3KpIeL0GyH+s/1SycAJjuXZtXUQ9W4zuG2FbKDXSH mJKVkxTLcS7F0AaOtWoH5/eeMfaU/JZTaYLzyc2IYker0Dc9O0q/JxwTXcCPWRrBiP+X x17w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Lx3MjXoe88MiIX5IhWgpqmUujExqITSTI2tqwFoixug=; b=xT/8JtRC+aBBVyuRdq5gRbpFhNLSNWfozpZLz79O/8jpegqHxfwUsQANDo5SuLuRpG uU7yfbFH5fdiJOxSCG37a87kKGqUt3j3jb+h6OUq1aLhYWsxbs5M00+TgdheBF7GjfR7 CDQEhgrBuCaxvg4Yy2hQxA0DHzN8lnBpmyma53kLB2Bk+Qo2ZNabSnaFVG3gSnKzFyNC 2trhsO7xAhXOFGLTNMn/iUH4fA+ZgCQQxsVuKLl9V1U0uu1z78jxaYHRXPjn5Qmg+Lxu 4FJtcd3mG0sCddBAoHIpd9wBqDKVBdBO5fSV+6cuEMT1D/5TU8GEbPYNJhE7aiUZyAT6 DsFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=k+PHqAIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a17090ad58b00b001ca996be6d9si3313557pju.133.2022.05.10.08.24.48; Tue, 10 May 2022 08:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@linuxfoundation.org header.s=korg header.b=k+PHqAIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243730AbiEJNww (ORCPT + 99 others); Tue, 10 May 2022 09:52:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243822AbiEJNgM (ORCPT ); Tue, 10 May 2022 09:36:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6218539B83; Tue, 10 May 2022 06:25:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9592B61765; Tue, 10 May 2022 13:25:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E49C385A6; Tue, 10 May 2022 13:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189108; bh=+Oi6KKHNjdO5u5QuK+P3rCqkmTPpCAXvw+YXjytcrj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k+PHqAIY79u+Hs+fhr+CCe5EAZO1R12U1j9dzde4rDg1GKd4NwKp2chwWM9nhEfWd GXn7m/Bn8oQ7eLIJ9RhDRRpZmnQOLCmp8lnJOeySnyFWNEv/6A1uQxDX3lVrU63aJA 12bhNPv+aiX5wubO7E00igKZTnppJRoc8zsKvnxw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Ong, Boon Leong" , Mohammad Athari Bin Ismail , Wong Vee Khee , Tan Tee Min , "David S. Miller" , Ong@vger.kernel.org Subject: [PATCH 5.10 15/70] net: stmmac: disable Split Header (SPH) for Intel platforms Date: Tue, 10 May 2022 15:07:34 +0200 Message-Id: <20220510130733.313519300@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tan Tee Min 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: # 5.10.x Suggested-by: Ong, Boon Leong Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: Wong Vee Khee Signed-off-by: Tan Tee Min Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -243,6 +243,7 @@ static int intel_mgbe_common_data(struct plat->has_gmac4 = 1; plat->force_sf_dma_mode = 0; plat->tso_en = 1; + plat->sph_disable = 1; plat->rx_sched_algorithm = MTL_RX_ALGORITHM_SP; --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5046,7 +5046,7 @@ int stmmac_dvr_probe(struct device *devi 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 = true; dev_info(priv->device, "SPH feature enabled\n"); --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -203,5 +203,6 @@ struct plat_stmmacenet_data { bool vlan_fail_q_en; u8 vlan_fail_q; unsigned int eee_usecs_rate; + bool sph_disable; }; #endif