From patchwork Fri Aug 23 10:50:09 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: 13774995 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 CB37BC531DC for ; Fri, 23 Aug 2024 10:53:38 +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=awdxA94+EDwJxMaDIv2LrPwLHdX9C7ivLS6VUmJAIug=; b=fE9MsMZJnLUR45Qqh63hGWVPPF 1ijbAiOXbiAUUuM87bY+9Y1RQON24fElX/qoFGz4dzaMShyI3ZW5ONCfUyC/esAWjCchwhFsrcxaO CVXfWfV7+BDBd3i/WY7k+vmx9JQ55tQsypwaD+sj3AsRt1Z6H1z+GRmXVTRFbA2N3SLohv57ATI8K dxmL3UAe3U4bxqXxZzzI9P1c5+UxMvdcGN/aZlaTjdEmDr6lqjoLzFJ1RC+GF22c4uZ9QdmNdbDEK JS31+PgqQwjwpGuqh7Yxmyd7nyLM2oR7/elfhOeI2UcEbIlkFqCYVx+D4Uh3kCLYy/cNYlR+J73IQ IABMdXOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRv6-0000000GRKy-2BDw; Fri, 23 Aug 2024 10:53:28 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRsL-0000000GQSI-0b8q for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 10:50:49 +0000 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2d3b36f5366so1332594a91.0 for ; Fri, 23 Aug 2024 03:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724410235; x=1725015035; 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=awdxA94+EDwJxMaDIv2LrPwLHdX9C7ivLS6VUmJAIug=; b=bpZedpxS+0ktbQRt82md3atvryQTEU1e6OyAY6fHXEbqkFn4x2MSmyNCK+jMXO0LfM PzmxJnGumodCbwhJMeosCQgmBxo5oPFLgsS9bOgd/KyRzFBe7TWR0MRtM4Lzz5/fLMUp otX/lt7hx4PFV60GmPC2sA/4tRsG2CwtVs2pMlJXODkuy3zydefVFtzxkzDK8JOxpq8W a2Bsirp+Jjy1mIXNCWr+4YkGsi8gSL/qeVzNZKGrAgA46o3evj6JtO1I4QnvJX2gVjxd AFPY6xHJCpcizdP4BqWEhXkwgu7pUkKKUhT4vg2JPKDX/MwU+jTv5Bj1CPNkhxp7OVFz 9esQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724410235; x=1725015035; 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=awdxA94+EDwJxMaDIv2LrPwLHdX9C7ivLS6VUmJAIug=; b=ocyrJWUaNeoxBhC7eBwGZtgRNPAWEFTG5XT94jj/ZsTqp9dW9dr6BDscYP8IM36R8K bco6m7a9w1lsyHfP+wpnt1nUw/NBS7QjYSiYvOneH+Pjo84MGJAT1js1Cg5C+DYI6MfW JGSuH9Ros109dhjrZIhmi51Od2Iu1PPxcHbpfswtzpXmzfcXXqOdlBu0k8+0pWUMVGlV tcJD827DocxP4e4Msod7YaIZzG5qkR4YH21WEEAuilWjbrZ1U822YIV+6Y7+csy+tAij ChEn8p2S2bGYzz203lmaPk/WqaBfDwUKjGXE8x00yDpGCI0hMJhpw7c0qJDMdAAAK92z IvWw== X-Forwarded-Encrypted: i=1; AJvYcCWSB10L+uiaX49pzodSnScWnL6j6DtIqz9Api+2Vdvr3ClXyMn7Kv/uGyxGt6oXjUDE8MwV9dv9zHMyKWaIwfQf@lists.infradead.org X-Gm-Message-State: AOJu0YwWziWLMV+xFSQWxXa+0A0nEIdHUE3hVN/UjHoNqQic/YbOFFLF JEPZn3mWrj79JJ3y6BnUkgtGxbKpNerlrrtdS7xKqOT+oWpo9uAf X-Google-Smtp-Source: AGHT+IH4kxTuSKLf4y16h4uAuWw4Yl1Q/hYlaVuMkg66SCkTUsl9iUC6V/GkbMkYFKLSZZvu6nVf0A== X-Received: by 2002:a17:90a:4611:b0:2d3:ce76:4af2 with SMTP id 98e67ed59e1d1-2d646bd8d39mr1735993a91.18.1724410235374; Fri, 23 Aug 2024 03:50:35 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2d5eb8d235esm6074344a91.6.2024.08.23.03.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 03:50:35 -0700 (PDT) From: Furong Xu <0x1207@gmail.com> To: Vladimir Oltean , Alexander Lobakin , Serge Semin , "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 v6 2/7] net: stmmac: drop stmmac_fpe_handshake Date: Fri, 23 Aug 2024 18:50:09 +0800 Message-Id: <9cd8ebf4b6c110b223219f15d024fe0be301a498.1724409007.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-20240823_035037_426859_1C791F90 X-CRM114-Status: GOOD ( 12.97 ) 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 process by calling stmmac_fpe_send_mpacket, stmmac_fpe_handshake should be gone. Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Vladimir Oltean --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - .../net/ethernet/stmicro/stmmac/stmmac_main.c | 23 +------------------ .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 8 ------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 458d6b16ce21..3ad182ef8e97 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -425,7 +425,6 @@ bool stmmac_eee_init(struct stmmac_priv *priv); int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt); int stmmac_reinit_ringparam(struct net_device *dev, u32 rx_size, u32 tx_size); int stmmac_bus_clks_config(struct stmmac_priv *priv, bool enabled); -void stmmac_fpe_handshake(struct stmmac_priv *priv, bool enable); static inline bool stmmac_xdp_is_enabled(struct stmmac_priv *priv) { 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; }