From patchwork Wed Aug 9 16:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 13348221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF863C0015E for ; Wed, 9 Aug 2023 17:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9kViaS2OU+RZ52hwlppJpnOc2g/7hM+bRqffm/uXp2o=; b=n+PQxsTzT+fgU6 skc3Vvhk1YEfr2B94dbBEM2aIDG9m0s9kUfsP1t/tkxLY0LeALJqkE/2DtDDngwg9SqQx5AGE4QOR oWExZWDu2NEC1qlB0FtcnXn072/E7xRwETifasmgzbFFNhLP5fjKg3BdsSf59u5GTFm1HQOEUwRgc 4y9yKARgbgdPBAQtk6mJ4aXQf8iDum6HY6Ma2pS5whYI9d+sp4EBfC+Dkk2EWF+2aGemkix6NDcFo PsnL9K07v6BUnnppz3ipVOW3UPU22qLqJPLdAjHUccTfrHiTMx/mJyIMe+06tBj2mIYxw85tZ+DDg 7J5aEslNrapZEzpCo6bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTmZJ-005T8k-1D; Wed, 09 Aug 2023 17:01:57 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTmZE-005T72-1e for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 17:01:53 +0000 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 0BF766415A; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_100152_591857_A2D273AB X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Acked-by: Alexandre TORGUE --- 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)