Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp32322rwl; Wed, 9 Aug 2023 10:27:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLyor4Ao1AbXGw1H1QI1t8+EKZKncBPSPunHmBZb9VKGLbSA8jC/LU6KFV0pVJRpuT32jw X-Received: by 2002:a17:902:6507:b0:1bd:9498:f15d with SMTP id b7-20020a170902650700b001bd9498f15dmr34458plk.24.1691602021379; Wed, 09 Aug 2023 10:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691602021; cv=none; d=google.com; s=arc-20160816; b=yVDkUjNHNRn20jFacpO+enNncCi4g/KEiQs+qvkVSu6gd7O7RZXeaWjTF0dbey7XOG 8kaiulWm1yGv2SJgn0iNiMIcoqnEaKnHM20hcmWKn3UJ4wumFbffYR4yVEIx96H9OYfM FUf4Wm41hGw8Jhfgq7Ne83GknchL3fPSGTjh3pA39Xf3SCN/9+KCs04YejKNVaWGLcQB YJDgv8a2ffXGcj16j2dgiU1u3K6hI28FBc8BxOjiLz6DjCVgkD2hiI+9YIjNUJH62Nn0 75cmPGHd6TqCMmDIoe60inwjrXxd9QxIaUDX14negB71K6LPQyoFh9fpKAo+zeTeJk4n mlcw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QIPWj2XioSVjoNk4HcFCZavqjRA/2B/K+BYa+G9JqvQ=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=iioLz0+xPS2UvU09q1FHTen2RcIn4u7j/mN8ycxxAYhOW35Igwrjw9kAlNroqLOZLj 5LKIU+6d87WHhmq36iKCeXZyGRL4UoJCnV/x629+Zc1q5HZp30YMi4r+le0OsGiQNH+I o6XB31XaaaU9Nmws2rsQz/aJXWNr3AbMSq/Kr1IiVIoTbf3Q8m6aIQgcbesOlMqfLCBm Q86h1gIDa0EARS1tdfv0KtZp5p8SQxij8of4LdxVXekpqmc4rYFEXmKGIpAufxqxAOKt WbdGvwHyl/3wJFz8Ofx7bw/Q1r0934tiJvu9UwP1YLgFM+cSw7B4xAkYbfH+eQ+VlgZv gAaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mKhnJU9A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q27-20020a635c1b000000b00563e0e86f17si9386763pgb.573.2023.08.09.10.26.49; Wed, 09 Aug 2023 10:27:01 -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=pass header.i=@kernel.org header.s=k20201202 header.b=mKhnJU9A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbjHIRB5 (ORCPT + 99 others); Wed, 9 Aug 2023 13:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232254AbjHIRBx (ORCPT ); Wed, 9 Aug 2023 13:01:53 -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 7B8722103; Wed, 9 Aug 2023 10:01:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0E50E64172; Wed, 9 Aug 2023 17:01:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBCDFC43391; Wed, 9 Aug 2023 17:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691600511; bh=d3IEyKFkLTaGuIoiBZGy50KXj/3eibRX6B2ljjyT/mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mKhnJU9A0/uVkKlzLC7/TVT/iJMx6vCu83QzvMvfZ+jUh/eMgVEu21OM6k5jAU7Di lSK6AFaSnKeHgFA6FY4qlb8Ex3ED0+DG+NJzW0FWIh0D7OhjVwNKu9eKxDOnbFV9Rt mnEm0ZKy/2r2pzub+rRpdypG7GjePu61sG3Pt1QeESKdN51pNwJtRcT9iXBDLJRacu 0umSLX7DLyPozRrkQhT8RIdzNeBs2R7kRUfUFIK98MhZA/gvm2CXSwHwM/7gE2EGIS udlaqpTVMHEBFK+0d4fk9GdoLtMbMQvP3OpdWJKD8zCNNiyUUxNjkZXn0IuJ5QLUvK h9LdQkZaoizPw== From: Jisheng Zhang To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Date: Thu, 10 Aug 2023 00:49:58 +0800 Message-Id: <20230809165007.1439-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230809165007.1439-1-jszhang@kernel.org> References: <20230809165007.1439-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 xgmac can support RX COE, but there's no two kinds of COE, I.E type 1 and type 2 COE. Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e1f1c034d325..15ed3947361b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6271,7 +6271,7 @@ static int stmmac_dma_cap_show(struct seq_file *seq, void *v) seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N"); seq_printf(seq, "\tChecksum Offload in TX: %s\n", (priv->dma_cap.tx_coe) ? "Y" : "N"); - if (priv->synopsys_id >= DWMAC_CORE_4_00) { + if (priv->synopsys_id >= DWMAC_CORE_4_00 || priv->plat->has_xgmac) { seq_printf(seq, "\tIP Checksum Offload in RX: %s\n", (priv->dma_cap.rx_coe) ? "Y" : "N"); } else { @@ -7013,7 +7013,7 @@ static int stmmac_hw_init(struct stmmac_priv *priv) if (priv->plat->rx_coe) { priv->hw->rx_csum = priv->plat->rx_coe; dev_info(priv->device, "RX Checksum Offload Engine supported\n"); - if (priv->synopsys_id < DWMAC_CORE_4_00) + if (priv->synopsys_id < DWMAC_CORE_4_00 && !priv->plat->has_xgmac) dev_info(priv->device, "COE Type %d\n", priv->hw->rx_csum); } if (priv->plat->tx_coe) -- 2.40.1