Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2207436rwo; Sun, 23 Jul 2023 09:47:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlFoKJOn5YxO5Tjp43Pl9PxOtNwlM7AyTbjjX/cmstU8R0J3zBHK46LVTbkEH8TGrH+QoE0h X-Received: by 2002:a05:6a20:cd:b0:12e:5f07:7ede with SMTP id 13-20020a056a2000cd00b0012e5f077edemr9109282pzh.41.1690130833727; Sun, 23 Jul 2023 09:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690130833; cv=none; d=google.com; s=arc-20160816; b=06Uf/6oQoJ6SPirf/7Y3jXv6x01eKZe+hkA8ms1Q5b/6bPMwln1z4wsqyBRuBx0g3N uZRpDAVCC8vlyqyA/1lmDseKkwU9PTtZr/Yj0vkLpna2IGfuX0g64P2kTYzNAYnjjx89 YWWZhSWZbvZIuhX8TeCoUF4BIZhKu/JFKLPn3d9z8o+nPd0SvgtOROwMCGnmC10HONnJ 5/9EP3v5MQDWo3QY+VG+KkYw1yFivbZRH2oOxezTUB6p5gGwxLvpCEe2Tk+pSRFQXTHz xWbbJLhpQOUhZZmJ0rxhqAr/yCcMIlCl63rX2N5KfYUdvqy1fvuEPANjtYSrqI189VdK XTPg== 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=d712xcUhMibIFAYMAz9WO5UEF107DKoUq9pVpglgBK9bq7GbzzQ5W9UwUhN5X4keM3 n/aTlc9oUK/qHaeER8p/eS0kDr8AtbQFRK/yUO5Tfu0+nTZ/xcmicvRO6flbGn6mh486 +iAL5F419AjDuJc+up93g8hgu4Gas21FhPzF4s/YT1U/ew0KTWcH8tdmenphIl1O8Gwd duA+LWiuJ+7K9itS8/4IW+S0M7KZSfPROfvUJRVKFqcUdoHaYS+v5e5A8oU0ITzPrVqM TB+kuG03c27FM1E/5O9LryepOKtkTK0ap+vHiZ149wUYrkqFQ3oyrfJl1EVssy6GKSAU Lcew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oNtkjvyO; 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 k186-20020a633dc3000000b0055fc5e67d65si7146347pga.179.2023.07.23.09.46.55; Sun, 23 Jul 2023 09:47:13 -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=oNtkjvyO; 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 S229914AbjGWQWS (ORCPT + 99 others); Sun, 23 Jul 2023 12:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbjGWQWL (ORCPT ); Sun, 23 Jul 2023 12:22:11 -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 A62C7E72; Sun, 23 Jul 2023 09:22:10 -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 39B0E60DD4; Sun, 23 Jul 2023 16:22:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49273C433CC; Sun, 23 Jul 2023 16:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690129329; bh=d3IEyKFkLTaGuIoiBZGy50KXj/3eibRX6B2ljjyT/mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNtkjvyOUHeIkOX+oRi5tpfcel+zBYZmSMYli+fDZh4fScvoPEQHtPRvw+0USUSQ0 6CZ71P8rCOIl7JTxwLoTHwzmjE78ZBDzikJh9aNm/EqvMA5jNmuk6Q3z6r+Jftj1s5 eFPbAtF9hF4XNccHZWz18TE9ucvwvtt9AiCDq5O4GtQ3K6jkW8PIdNoktHmf7GDBjI Y8A1+JY3+sitUck351vYT6XQs4UP33G6+i6KxJGoY+dq1BF9fOu9F3QEUkbSbRAf0M tHiP2so+je0MJDpFysi0LVlUoCoqMIvidgBjqbdKeKlWLelEOQwVnTs+/6D0aC7xE/ KE5MdoQ5zYkhA== 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 01/10] net: stmmac: correct RX COE parsing for xgmac Date: Mon, 24 Jul 2023 00:10:20 +0800 Message-Id: <20230723161029.1345-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230723161029.1345-1-jszhang@kernel.org> References: <20230723161029.1345-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,T_SCC_BODY_TEXT_LINE 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