From patchwork Mon Aug 19 07:25:15 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: 13768069 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 36931C5320E for ; Mon, 19 Aug 2024 08:30:33 +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=rLt6TUmOtDbJB+iVFH/ZIZR29i hbYNyTTQsNGmgZq9O1QGW8NWftqUwkUCNzpAN4ChJsYOg2L105zX1jYoxXtQ9nHLPnWaUsWobaqW0 VZ7y1pW54i8rCMavhIcGohy/NPFWL1XO37hQwQwrFcGl+etvDKHCUQ8W8xq+h/mnbVLPABnkq/se/ 2XnAv2JQ5B+lPXlystKSF20PChZ/BVW5//AtyRxdZxPJA6W3qj2Sz18EmJ8zLePadyggZmbddonJR fuzbZzHmnLj299v7q8Uw9/bsv7sm4Hp1knYxDCFEw5SiMglHU8DxVM3Ba8qBgMTtNGMFQErv4X6GC lgDjA4ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfxmR-00000000mKr-0opP; Mon, 19 Aug 2024 08:30:23 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfwmI-00000000dGp-41FV for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 07:26:30 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-202089e57d8so15626025ad.0 for ; Mon, 19 Aug 2024 00:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724052370; x=1724657170; 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=MOVPFhhEv4w1YVaQqnnxyLuxK4ZXh6fdBUziy6K+KJXfDNihM1cv4d26zQR6V+SP+U /5GxyFW/bQNyiIQjxfFp8MRwJxZFhfRYDWfIIkGgstrwOkqbzwb5Mu65lX/ompt6nMz7 t39fzLSMgIqw74ZlnGfDVQPI3TL/6Si/6ljr6jpqZer2SqaXjCMy8UX4DL83zwS4cwPR gj+DTfP3fKSB4/3rPwZpzhVwkCTjawDETKOqXwYRov+7x9jIZxW22k5s16Z1X3yR9Xsh LwDYGUvg3PPXbz67jPzGObRCsh2eSNnso5Ae2W45XqJZk4JCBCV8Cv4ebaDYW4819Nup 7WfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724052370; x=1724657170; 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=UlfBU1uH2UuIaWZ8oRMCgFhEyMvoQ+CXRpRdwJvFZZ01HGR75tBKX94VawAmV3wMyo KKr6LdAcViZUbcb3Lx5MX3L3WJIiS/OXLWb5O25h5wii9lY5eSM8gInRcdiF1zeaYx/v OpCtMevlNUUlUXDpNyLDDSxkyHlKPwY/12CbhLdLxHwkR0t/wOXt3fdesq63n2yAeCB2 1REzMUikS84e+e9T+EsW9Id3UQjTcg8+w3xzRp0NPZrECAlXqNzu5eo4zgAFgjru8dH1 L66ppONk0Alq44hbySSisKgIrGZC9dz4nTKckl+iB9TQ5Svylb3GsHHIJsZSU2YptLT1 lAug== X-Forwarded-Encrypted: i=1; AJvYcCXqUSO8M6COPFny4JF4Vob9eD4vOeqtXAg0aTOuDfumUo4Zjh44M9T8LOfaxKJrhlu5U6jH4kDRWyzboJZ7B5Sgy3vgsMIxBt+QAK6FKjLs9w0ht5s= X-Gm-Message-State: AOJu0YzFjCWjzJkWYH8cLaQQuODkFBhq6CimnikO8jVkkX+ro6RLJiJe 6V1imAGozwP82Iq4zVvZpmHcU6IJ2sQm4+fIDGfY13PuzsMc/ERB X-Google-Smtp-Source: AGHT+IGso1hgFDQM2RtHO9bYMoQKU4sDJZP80zUHXwvevdEA2krPBWan9i05+Zt07fQeZ1SzCfuwBA== X-Received: by 2002:a17:902:e549:b0:1fd:8b77:998e with SMTP id d9443c01a7336-202062baefamr138939585ad.29.1724052369603; Mon, 19 Aug 2024 00:26:09 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-201f02faa5dsm58340855ad.2.2024.08.19.00.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 00:26:09 -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 v3 2/7] net: stmmac: drop stmmac_fpe_handshake Date: Mon, 19 Aug 2024 15:25:15 +0800 Message-Id: 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-20240819_002611_016659_1BA2F196 X-CRM114-Status: GOOD ( 12.75 ) 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> --- .../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; }