Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp639387lqb; Wed, 17 Apr 2024 07:01:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNANz6mkIu4soS+xr18ifg+Pb3vdC4+DhL175S6XnZ+I5mBg6ToQkQomk3k2WLwbMIJ5jq3WQXQyOeSRxKv+pRESOw3JuGJ7cKZlrBcQ== X-Google-Smtp-Source: AGHT+IFyIvBFgUfMQVIkMxNN9b1veV7nNQk4yHrN9oFwfX46oDZuuyeGqZZwnqcop2VWuWojlHNM X-Received: by 2002:a17:903:124a:b0:1e4:2859:e59b with SMTP id u10-20020a170903124a00b001e42859e59bmr8890650plh.28.1713362459734; Wed, 17 Apr 2024 07:00:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713362459; cv=pass; d=google.com; s=arc-20160816; b=Z9CCgnCOIuMSx9tF8b74HfVK5ruEtr8dfNqpezVmAXCJ5jspfrcfB0wdZO9lGMdjCg jutvLQvhjLQ+QtqlwQSkeFpgWmt+4Zm7xvdhXYIGXxljVfkUs3wYXAfEvSfRA2FRRNkQ v1YBBWEa3k1bVKWRqYKeuVojHEXOO5axhLT6DdczD0xSCF3oG0nckZ6HLl2BgtEytibc pQMj1XBfDgMhHBlxf9o1WYow3C0a3cy3NAQGJnED+D1mkXiz9cmR82gwSecfaTzI2XBd 4h5H30yrh9FaheyzTPTfMn3pJbOdV13YUOnqrGG81Xn8KjuLkuGADa3K5a8HjSJIDOi7 k9OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wCuHkgJvG5roUfAj93LLXibybGnOYsen6TK2djTp+uM=; fh=b1I6q0nTnvGpylAslsMFtYJVyZGFeCzMcPGnY8I71Nw=; b=GZfqbAG3SPuwela29wDzxUUp7A5H8TwKWMYeaOCozw4ooDjJ9H+2yMWbyX0cAQs0B8 pUVfZMzRps1u8Mqul98Y3iVXJPL6dfPZlpFLByA0+zduUq1kNeWd6ZvLdHFUUnotD3DB uggdjvcKMGogLjFryil5EY5Kxkqq5yg5tVkd6Kfrwk+CeEJ9Y8/OqWS/6/rSQK1SZJKw Q6/9JXiIFTfMeIfJiOuqUZjcYfGTxxzEc90sfWCPYR1oTD6UhBZqYpzf+8K8YdHrw3KA w5vf3bY6YVCSP+K+RvOg/Q24mXQYMq62MDWtgGQCH24g7T6if5yXJaazzaPRNUzWsXHD EewA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GEtfi8ch; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-148643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t18-20020a17090340d200b001e0c8eaccfdsi11384602pld.243.2024.04.17.07.00.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 07:00:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GEtfi8ch; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-148643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 68AA22822E9 for ; Wed, 17 Apr 2024 14:00:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E29181422A1; Wed, 17 Apr 2024 14:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GEtfi8ch" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 5CC38140E5C; Wed, 17 Apr 2024 14:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713362421; cv=none; b=FMwurGoU8NVZoY3b1mh6I33juHf8wxlEyMRA/F2KuJkeZnWD+W3vD2G4YJ1foFBLN4/EDm52RFwdnRHhjwP6fcdmUygg19m+gXQ8YRqYvLiE8i2XVF2JaL4ztPSbyYiJcvHF63NBCFHcGZAOx3cY4d5GtJwzWyKZfwskFf/R/PY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713362421; c=relaxed/simple; bh=LMVQWGUTFa6R1Mmddy9P7trPn/rz+V8Mg0Tt5yij26E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ITxPIcyX4m65jrkpVhUMpEvkMKbRJeCTS9Wf1a+XOP/uSlHl6vn2NgroUQnp8WQsYUQqhkKS/CMNy1ZFHuSoTrXeRkK+43UeCJQNaiXl37MOQLAH4moBF+bgHbJQ9ng2iMPH1+gHqiXgpFxD/m7BWIuR7WfLNRKVatQRk3aiLaM= 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=GEtfi8ch; arc=none smtp.client-ip=209.85.167.50 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 Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-516d0161e13so6991906e87.3; Wed, 17 Apr 2024 07:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713362417; x=1713967217; 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=wCuHkgJvG5roUfAj93LLXibybGnOYsen6TK2djTp+uM=; b=GEtfi8chew2xHQEzEaas+uMeKgqYaXCUrzR0TlTU4eS5Nlvgacy0ef7afqq+n7BP23 JKpwpYvjz2w6ZCwSyt+/mlv9RwRnNQe5IQDnavCt02sTOU88/CKn4pg//yCnQQdghIYd //bzKvNg+ExAKGmPo14N0BfczW/WDW5tm9Z2Limo09PI1dNQ/4HZcxp4944Wdc/w8cpO F1i2CSms0HanXvV4NeEvmKDPbExus+FlN0HC6PK7sR/GBJTsPjs/Vhx5ua99HyDbUN8+ LrfXMnZfnDsO2RpgKN5PP+pnnBV6GB5pyM4GGpQci9moNsJNb6oLUbrHw1NpgBgwcRQ7 YL6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713362417; x=1713967217; 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=wCuHkgJvG5roUfAj93LLXibybGnOYsen6TK2djTp+uM=; b=cd5AYwE8OJ9JFAtsDLk5T5IpDmqNxtoNB9c/mVZBaPNL7tRTT+aDC310/dCa5OFeQr 9hcNFhmpain4A8BKVfOc+l0AFfIq0nUKu/IR8H9fr+7qz3nbOdnA3SDGa3usT9SOtw+q 9AnQX4tRvOFrcLWN7sU+uynVY4CZ4pTkgC9jtfiDPR4GMnfG0mIutancTyX5LZ44XWTG Sp0ELmPKCLA52m/rjQm0Di+tysyIxsTwy1B1rUbupphmbDfCZ6C18l6q4zJ1NkOmEytd QO15b046uBFV9ENKJKE+d9ZuFAjgbFOoJwS8cExgRJJb0JhH4F9mbV+XUBMWUPs9AAmp rJ0w== X-Forwarded-Encrypted: i=1; AJvYcCUuBye2oKwaUqXn6QeHTdELUWKj/Nk+UhCfCrjS9fD+dBERK7ORRE6W5fYD6iba4t5rIdepoyKv+8w3DqIj8yPJbSaIZj9jP94X1tIpQPKiSoW6NioZFM4M0g+CtmcxYlCDN+kB X-Gm-Message-State: AOJu0YxjVTo2CQf82QLgWZh1yLBQGJlhrw3mkzhT3m/4xQuv+sLrM7Jv gbIIe77FXhJHoM2Rc9nNcwLJCjXoaavgMHKqBMvqvhwtrJQDsNvb X-Received: by 2002:a05:6512:1150:b0:516:ced5:3afa with SMTP id m16-20020a056512115000b00516ced53afamr14396995lfg.5.1713362417376; Wed, 17 Apr 2024 07:00:17 -0700 (PDT) Received: from localhost ([94.125.187.42]) by smtp.gmail.com with ESMTPSA id g11-20020a0565123b8b00b00518f53da2dfsm890439lfv.291.2024.04.17.07.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 07:00:17 -0700 (PDT) From: Serge Semin To: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Yanteng Si , Romain Gantois , Maxime Coquelin Cc: Serge Semin , Simon Horman , Huacai Chen , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 1/2] net: stmmac: Rename phylink_get_caps() callback to update_caps() Date: Wed, 17 Apr 2024 17:00:07 +0300 Message-ID: <20240417140013.12575-2-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240417140013.12575-1-fancer.lancer@gmail.com> References: <20240417140013.12575-1-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since recent commits the stmmac_ops::phylink_get_caps() callback has no longer been responsible for the phylink MAC capabilities getting, but merely updates the MAC capabilities in the mac_device_info::link::caps field. Rename the callback to comply with the what the method does now. Signed-off-by: Serge Semin --- Link: https://lore.kernel.org/netdev/20240412180340.7965-5-fancer.lancer@gmail.com/ Changelog v2: - This is a new patch created based on the discussion around patch #4 in the series above. --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/hwif.h | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index a38226d7cc6a..b25774d69195 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -68,7 +68,7 @@ static void dwmac4_core_init(struct mac_device_info *hw, init_waitqueue_head(&priv->tstamp_busy_wait); } -static void dwmac4_phylink_get_caps(struct stmmac_priv *priv) +static void dwmac4_update_caps(struct stmmac_priv *priv) { if (priv->plat->tx_queues_to_use > 1) priv->hw->link.caps &= ~(MAC_10HD | MAC_100HD | MAC_1000HD); @@ -1190,7 +1190,7 @@ static void dwmac4_set_hw_vlan_mode(struct mac_device_info *hw) const struct stmmac_ops dwmac4_ops = { .core_init = dwmac4_core_init, - .phylink_get_caps = dwmac4_phylink_get_caps, + .update_caps = dwmac4_update_caps, .set_mac = stmmac_set_mac, .rx_ipc = dwmac4_rx_ipc_enable, .rx_queue_enable = dwmac4_rx_queue_enable, @@ -1235,7 +1235,7 @@ const struct stmmac_ops dwmac4_ops = { const struct stmmac_ops dwmac410_ops = { .core_init = dwmac4_core_init, - .phylink_get_caps = dwmac4_phylink_get_caps, + .update_caps = dwmac4_update_caps, .set_mac = stmmac_dwmac4_set_mac, .rx_ipc = dwmac4_rx_ipc_enable, .rx_queue_enable = dwmac4_rx_queue_enable, @@ -1284,7 +1284,7 @@ const struct stmmac_ops dwmac410_ops = { const struct stmmac_ops dwmac510_ops = { .core_init = dwmac4_core_init, - .phylink_get_caps = dwmac4_phylink_get_caps, + .update_caps = dwmac4_update_caps, .set_mac = stmmac_dwmac4_set_mac, .rx_ipc = dwmac4_rx_ipc_enable, .rx_queue_enable = dwmac4_rx_queue_enable, diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h index 7be04b54738b..90384db228b5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/hwif.h +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h @@ -308,8 +308,8 @@ struct stmmac_est; struct stmmac_ops { /* MAC core initialization */ void (*core_init)(struct mac_device_info *hw, struct net_device *dev); - /* Get phylink capabilities */ - void (*phylink_get_caps)(struct stmmac_priv *priv); + /* Update MAC capabilities */ + void (*update_caps)(struct stmmac_priv *priv); /* Enable the MAC RX/TX */ void (*set_mac)(void __iomem *ioaddr, bool enable); /* Enable and verify that the IPC module is supported */ @@ -430,8 +430,8 @@ struct stmmac_ops { #define stmmac_core_init(__priv, __args...) \ stmmac_do_void_callback(__priv, mac, core_init, __args) -#define stmmac_mac_phylink_get_caps(__priv) \ - stmmac_do_void_callback(__priv, mac, phylink_get_caps, __priv) +#define stmmac_mac_update_caps(__priv) \ + stmmac_do_void_callback(__priv, mac, update_caps, __priv) #define stmmac_mac_set(__priv, __args...) \ stmmac_do_void_callback(__priv, mac, set_mac, __args) #define stmmac_rx_ipc(__priv, __args...) \ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 7c6fb14b5555..b810f6b69bf5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1225,8 +1225,8 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) xpcs_get_interfaces(priv->hw->xpcs, priv->phylink_config.supported_interfaces); - /* Get the MAC specific capabilities */ - stmmac_mac_phylink_get_caps(priv); + /* Refresh the MAC-specific capabilities */ + stmmac_mac_update_caps(priv); priv->phylink_config.mac_capabilities = priv->hw->link.caps; @@ -7341,7 +7341,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt) priv->rss.table[i] = ethtool_rxfh_indir_default(i, rx_cnt); - stmmac_mac_phylink_get_caps(priv); + stmmac_mac_update_caps(priv); priv->phylink_config.mac_capabilities = priv->hw->link.caps; -- 2.43.0