From patchwork Thu Sep 5 07:02:23 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: 13791805 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5142419307D; Thu, 5 Sep 2024 07:03:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725519791; cv=none; b=Lml+Cqj3rL179AmJLK9My9m295z5FUSHSVJVy7rw4MQzmk8+RVDhtHkl6hQp5U2RgR5hJaeq0wOx6nz4Ig9ebef74UTwWbxWwf0t0EK1G4U1+dCvQj6OK23yqfbGiHWX8cTtQI1/B3yRJG0uLd7QGnQU8AK/Stpd0sRY2KYKZfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725519791; c=relaxed/simple; bh=Uf03NK+TcTTM3jFMPZZRi2Aq+HZ0s1AWpNTiYA/4EUU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d5d6v8a0wPXrG3d+ux0OsHJpjxKsOdrOnv+xA0tYw0GOE+wMy4s7a1/GRb6fE26YXRfRnqTg0CF734Bngrg1ffiIPMURI476FolyEBAMPY/Mq8Xqv5Bew3aHxWCorHEgnJ/BeioaJI+SsBNx1KYVdeaNCgEIZX799G50dYlh9+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C2FyIo1e; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C2FyIo1e" Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7c6aee8e8daso379947a12.0; Thu, 05 Sep 2024 00:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725519789; x=1726124589; darn=vger.kernel.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=C2FyIo1egBofgmUYIvmuyAHcoIUg7Tf48EyFJ2LDTs+C8g1drrowmZGxYGEDzN5bKI gbZMNLRJp6ENTXeJw/x3LpsqqOMyduiY7xmaGSyaEuN4sVuT9LWXT6Xoh+B+LPKPMtAC D4ZzcdQm6M/3irpTO/n3Ss7U9me3AhbxFfOK6PRNcwsVPdWBsP+TfvTxPPzJx4oTadSi ha+rd4rtjpMVolrcAGAfceiJFsDiUdGWCgt80G6MzutvmGVZi+63L0kuDZEVEl/dmQIU M31SbZ7D64SoiVhVe92bvVQzmldgUBea8aKAQdFqbdgM3fSI1qM4/l8cfdJgdkG0Snq9 vpEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725519789; x=1726124589; 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=Y6tgp7p5+iNGEyqU33p2voAsna5aeQfxpUEhrj3IFwFQf/rgm+ibadaOD+44Ejhb71 0imhU+dIfgG4JmqY9qQlne2fzGksV8TIWb0NwOiJU9fEf4+KAWDRF693JfmG0E1YxWH3 rnH0FIY7umx0WwN4wiaPnVYX+jQATPqWI1tqM82MDJ80JwNV8MgK82iGV/5cSwVExbVl EfQWa4zTFDpc/E8ZI6OV2351lWuRtY5qCDyc7/z90SShy0OwV1J51pQj2Vuth8nw1MTi laoVbBsUTSwfMq9wYh7QLDGNDAr8JW+zL6Y/1reUcZXXk2VF6a/CaZmkm1zbO0D3XEyD u0sQ== X-Forwarded-Encrypted: i=1; AJvYcCX0XJVdTbiwbTIG6ly4NLNSopFWje2T2kBWrF5oGgh9DZji8ZY0/DlV7SvpZxGgdDUxuEtinzmxBZkz+Kk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz28N2ru7k/Q7w4ZOLw59FwuYXFeyb8EButVkvx3t3TzZaX6BR0 qgEIlpywgCwBsSCunq+xBdVyuK8JR+4Pk/evv/+TVOrCjDGHW/Fi X-Google-Smtp-Source: AGHT+IFT4qp7h7Nuph1LHaqW5W2hW5lptxxEk1BW1zujmEup6MSe2iA4mOFXdmD6BB8ggxB4B1FPnA== X-Received: by 2002:a05:6a21:3117:b0:1c4:2132:e205 with SMTP id adf61e73a8af0-1cece047c41mr16976626637.48.1725519789291; Thu, 05 Sep 2024 00:03:09 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71778595107sm2604897b3a.150.2024.09.05.00.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 00:03:08 -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, rmk+kernel@armlinux.org.uk, linux@armlinux.org.uk, xfr@outlook.com, Furong Xu <0x1207@gmail.com> Subject: [PATCH net-next v8 2/7] net: stmmac: drop stmmac_fpe_handshake Date: Thu, 5 Sep 2024 15:02:23 +0800 Message-Id: <8259fee4e49ccb645ba40c79bc677c333ac0e14b.1725518135.git.0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.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; }