From patchwork Tue Aug 20 09:38:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Furong Xu <0x1207@gmail.com> X-Patchwork-Id: 13769766 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 33536C3DA4A for ; Tue, 20 Aug 2024 09:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e93oae2VnzqVNZVCAViMoa1uvgxDslJYuHwS+x1kihw=; b=gFvbe+SM+mO6X6jT2LYCPUncPa 47b1ftQ0mqM8nHrjKFRO4OqXOPBBHsgYb2OXPYxuJL/sbpd8+lDtgsOeoEkHGUPtaYsNSSr2lM1Nv uA/FwYcqd5QtpDYw90hcQgmsovzyYgYCqGqQVQlp2AgFtBDJv04vWU/HaODA9qNgeOHH01NIH+qG9 Ly3w/PbbVgN/0xLq/fRxmL5RzlX8/FICJFcvd0o91CKiTIyPHVaX5ymbyWtUctbt68VUcQ3YKQeoq K2rckN/c30uiMC13PwOYATF68qs1duszHeaQailZtI30+yLNhNEh8rKRLAlgQkPXHXcQyKcjd4r2s Lmeio5gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgLMG-00000004cla-3t6J; Tue, 20 Aug 2024 09:40:57 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgLKW-00000004cEW-0UW0 for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Aug 2024 09:39:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=e93oae2VnzqVNZVCAViMoa1uvgxDslJYuHwS+x1kihw=; b=McbVLbOCJZ8hopdXHG33HWVxJg psKXUHldcKPXkqBDpaaQWD4R3dPR7Fect88ic7MJfOSrHmCOmsC771Ef5h83KTyeXJhBBSb+oyKAr urU91Y+3JwCRzRmqLCEMSKI3rzuVNpj0Tmo6n/qzQouwHoQuRGFyqEfLqTdAbeMRwWRb7Q0xEuRPK HA+JxIAe1w2vgKQCgssPS0b74GBsfIKMVNIVAuTHJHp4sRclMg2Ms/Q2AOnjvvK3QBaHLN/iiYCIe mBuJR2gfzsPm8mRtYD8k0xwm/zhMxq6HMME2qKMzg3QylTROPBuKNRSq1JZJ0XU8K6vLsvqSl+Ihh glPd5cxg==; Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgLKT-00000009IV8-07ED for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 09:39:06 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7c1324be8easo4327962a12.1 for ; Tue, 20 Aug 2024 02:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724146742; x=1724751542; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e93oae2VnzqVNZVCAViMoa1uvgxDslJYuHwS+x1kihw=; b=HDMe4mwFJOu3d3fuWFvtra9gemCcTa1uiiHSqvqfRCjWC68x8fsI5llNEQi3Ei5S+Z SNdDHxOTwg3R6F82ok1Y4woysCSC2xTZF85+4eChnqK9Lhl0SuyHs+21WmzbWojVCdYj c8jxdRGu3TIcahkhVxGSI2Qx2pvlRbZB4iG192Q3lUS9NRqvuEIKi5FRk7rkocQ0mH2V u0cE3I1k0PegZq8OPmkt1iA9RGp7IgicNI8+7VALt1Mwm8FJzizYSCtK2koOsJWPZZVp eZl+1cpb2YYDFJHVUYI+kDNxUVKYwZDrA7i6Vo42/765wOMMoN4S0pMFwsRl36D4gLY2 3qFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724146742; x=1724751542; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e93oae2VnzqVNZVCAViMoa1uvgxDslJYuHwS+x1kihw=; b=QpFAUqvdXWWeSBx4C0SVkeCbOk5pTIOLg3u9v2+2LF2Us5EAUA5XdZCAGhWCVhZeqQ SW9aC/IjflUlI5qB0WqyY5+ey/Fx8pe73+ptteT91xtGEf/dLXLi8pmu6r4aC/cuWt2P l2npaYWv58qG4XorFOA3veni8qo0e2vuG2gcdwWX04gn6Ax7OaBYDIP7XJIx6fqRsiVR v1OkDyxBb5Wa5e7WPFhT+lsQZ9bCOC6VYoek6QcGxeZLtvlrUiF6CPB3UPArLS+B6Qo3 KyURsKDrOPn/P6YKet5pX8TsYQdlHt7yWUbMjdMHaXhplkX/wIGcmopPBiWIcteYIzS5 8MhA== X-Forwarded-Encrypted: i=1; AJvYcCV3E0Ka3nLUSnAw4raOLm3YOyly1q6PwpXzlPImiOz/FwiEkcoMLFGnig4x5XnjT7NvkoS7LuTk+pu4rBbhrt7S@lists.infradead.org X-Gm-Message-State: AOJu0YyNLBcwUo0gZQU9nyt/6B7NrBegUcuZqWydyNWfuKcsxHOgnvLs uNPWxv/fVbeqWBEsgkwnTWtm2xtCavLNd1aLqZdKAyqljJgBFxKp X-Google-Smtp-Source: AGHT+IH9IHp5PU/VYkc4YktJk5Ok0SiYyDX8GtYRZy3g1/c5AvOIGPY1vcvblQDjo+zjtJkaJDp13w== X-Received: by 2002:a17:90a:8d03:b0:2c2:4109:9466 with SMTP id 98e67ed59e1d1-2d47321b181mr3652350a91.8.1724146741853; Tue, 20 Aug 2024 02:39:01 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2d45246061dsm3230608a91.8.2024.08.20.02.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 02:39:01 -0700 (PDT) From: Furong Xu <0x1207@gmail.com> To: Serge Semin , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, Furong Xu <0x1207@gmail.com> Subject: [PATCH net-next v4 2/7] net: stmmac: drop stmmac_fpe_handshake Date: Tue, 20 Aug 2024 17:38:30 +0800 Message-Id: <4358074eebdfedf4d129ccce40434af5f6e2b3f9.1724145786.git.0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_103905_119087_E95982B8 X-CRM114-Status: GOOD ( 12.90 ) 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 ethtool --set-mm can trigger FPE verification processe by calling stmmac_fpe_send_mpacket, stmmac_fpe_handshake should be gone. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 23 +------------------ .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 8 ------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 529fe31f8b04..3072ad33b105 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3533,13 +3533,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool ptp_register) stmmac_set_hw_vlan_mode(priv, priv->hw); - if (priv->dma_cap.fpesel) { + if (priv->dma_cap.fpesel) stmmac_fpe_start_wq(priv); - if (priv->fpe_cfg.enable) - stmmac_fpe_handshake(priv, true); - } - return 0; } @@ -7425,22 +7421,6 @@ static void stmmac_fpe_lp_task(struct work_struct *work) clear_bit(__FPE_TASK_SCHED, &priv->fpe_task_state); } -void stmmac_fpe_handshake(struct stmmac_priv *priv, bool enable) -{ - if (priv->fpe_cfg.hs_enable != enable) { - if (enable) { - stmmac_fpe_send_mpacket(priv, priv->ioaddr, - &priv->fpe_cfg, - MPACKET_VERIFY); - } else { - priv->fpe_cfg.lo_fpe_state = FPE_STATE_OFF; - priv->fpe_cfg.lp_fpe_state = FPE_STATE_OFF; - } - - priv->fpe_cfg.hs_enable = enable; - } -} - static int stmmac_xdp_rx_timestamp(const struct xdp_md *_ctx, u64 *timestamp) { const struct stmmac_xdp_buff *ctx = (void *)_ctx; @@ -7902,7 +7882,6 @@ int stmmac_suspend(struct device *dev) priv->plat->tx_queues_to_use, priv->plat->rx_queues_to_use, false); - stmmac_fpe_handshake(priv, false); stmmac_fpe_stop_wq(priv); } diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 9cc41ed01882..b0cc45331ff7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -1078,11 +1078,6 @@ static int tc_taprio_configure(struct stmmac_priv *priv, netdev_info(priv->dev, "configured EST\n"); - if (fpe) { - stmmac_fpe_handshake(priv, true); - netdev_info(priv->dev, "start FPE handshake\n"); - } - return 0; disable: @@ -1107,9 +1102,6 @@ static int tc_taprio_configure(struct stmmac_priv *priv, false); netdev_info(priv->dev, "disabled FPE\n"); - stmmac_fpe_handshake(priv, false); - netdev_info(priv->dev, "stop FPE handshake\n"); - return ret; }