Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3324272rwb; Mon, 7 Aug 2023 11:33:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6QHO3vCxDTcElUOkefmc2jnhUE3OG7SymJV6CLHNo//zjoZ2jUUWthKxug4pKKLGI7dMo X-Received: by 2002:a05:6a00:22d2:b0:682:3186:55e0 with SMTP id f18-20020a056a0022d200b00682318655e0mr10231582pfj.12.1691433232479; Mon, 07 Aug 2023 11:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691433232; cv=none; d=google.com; s=arc-20160816; b=i38YKfR9qlJwBFRfh/1mRxymUD7dN/Yt06zvCVoR94dTT9OfWa8+V4rajhdLbcQF4z 3eODx00CIgAD7gFyRxCOCCBiB4T7iqD4hWmdNLcrjIH97kixAL2GrE+09m5G2QGCmfBs gFi525vF0/6dT/gzzZjyoPvb9ILPs3EIUlxAtHWqtzYJaHwnxDIhus5775TNo0fmpVcT 1138bEwtlTtLwkz9HfB2Gx+IkSCoTzhzN8228nPAST8PCJT8jCXdRM5Lg67jRwHnncZG VKpBlmARFOlvMV24y+ytpSo6JnURLC43X8QOLlHESbjWuV2N3tPzQkBSJPUhO6OFhA3N JthQ== 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=e+ys5wOcN5NRoAFcW8xmBfxIEo+XT1kR6CK+4LK80PUmw2QhkWe2c7zAMAvZZ27WuJ Q0xKBHJ8gk59bs6B47Jl+Z2cEs3vTwFJl+FJO5ohEw5MwFVZF2bB1R/Z4rV9nyYb8FVp wbAFarQBRfq5RCzDvt5rkHY5znEqfrINbBYZinVdhMLCP7FQ1eXzBa7Z7wUMGJDWdpnh dku6G0+dptxhIf0ZWNzxL+kpl+9vPuGPx2hbPDaSQCWKGD9IIPYByACW2SrFaaz9cCjM B1Q/MkPDDp+Dgk1PaB0vZ2bcXpd0nRgOtpDwtdgRa2QzIeuj8wy+PknuEHmFEpIDfLrF Dkcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nAcfFxsP; 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 o17-20020a635d51000000b00543c84bf588si5846362pgm.473.2023.08.07.11.33.40; Mon, 07 Aug 2023 11:33:52 -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=nAcfFxsP; 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 S231944AbjHGQxz (ORCPT + 99 others); Mon, 7 Aug 2023 12:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjHGQxv (ORCPT ); Mon, 7 Aug 2023 12:53:51 -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 D48131BC8; Mon, 7 Aug 2023 09:53:38 -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 5D06361F9C; Mon, 7 Aug 2023 16:53:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E750AC433C8; Mon, 7 Aug 2023 16:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691427217; bh=d3IEyKFkLTaGuIoiBZGy50KXj/3eibRX6B2ljjyT/mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAcfFxsP9hoSseU0oVL+SpoVVWxXzN/0EOciYwlCvHTMWfRw74fexBngTLM0IatiX ArRiV6z104rl8V7zNWxQWerv2zBgcHujufjmbIPz52D2ttE+kMO6C7D7dNRJGNswLt wJrZyTePJljzXuaxXX9F+AMbVORzjMxrVcyNaPx7LlqK44ISS9aG87vBqaYPUdMV8A j6WZpBIZ42smfnj7N5mNjHfyFrqE0ccu+kKN4vur09NaK8ujT/w7NLuuzDH8dqnI+f mwxjeaaN7gmn10Tjggri8rZo+kCPep984ro35adhJCpqVowWA+WHxncc0369yHjq7e VFiFvFMqXgunw== 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 v2 01/10] net: stmmac: correct RX COE parsing for xgmac Date: Tue, 8 Aug 2023 00:41:42 +0800 Message-Id: <20230807164151.1130-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230807164151.1130-1-jszhang@kernel.org> References: <20230807164151.1130-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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