Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1237734lqb; Thu, 18 Apr 2024 04:29:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWX3i49M9KBfDx2XTspi7g7XZA/vi/ydyCsnA+5BrCfKbeKdZhWjPOT5oN5JC+ZPtt4eHulos5UqUkWhI+axZWo3sFoOO7JletmkLo1mA== X-Google-Smtp-Source: AGHT+IEQRSq0CzGtF4RjZeZosw0fWH0zOBSgpAFhWqmtYbPG1cwgK7n7P+FAuL9vqzpBsXxwsoky X-Received: by 2002:a05:620a:16d7:b0:78e:d2e7:3e9e with SMTP id a23-20020a05620a16d700b0078ed2e73e9emr2368468qkn.68.1713439745715; Thu, 18 Apr 2024 04:29:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713439745; cv=pass; d=google.com; s=arc-20160816; b=Rv7QnzhiwM2qr4wYBZ8oRlnvfe0vXqwaoAnrDZXPLa1JnuFL9zDrKVN0hnVCoO8uLm Tv8Qfdav0b9ox/R8dPzesd40R+LtZnZrsuymW1Si6hTNVjPJrxmj2yNe1fAVDjwbX9jj vP/ayAClVFNpo3QaSTO/gruoliu3ioaBrcTglsgnSyVsFtNjcYYpVtWhmAXe9iaeM5rm 0YQyItz8GKHpznu/SEFT91oYA+942pA4ms9qQD1/VWaT6Uo++L06xxThg9UbAtxOGPJc Ie9S8N+yHD7BLRqZIEy4U9w93jlJCZXfyDdZ2IviRTmVelYxvle2FiI4a67GxQJvQVOW OUBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=0leo610WlDW38GlBTuA6KaiVJk/RBRpUySYdLn+9iHg=; fh=ynN1lbGOBkhT7aRIoe6aLZhUPdKyhTYXbwpvd3TAMas=; b=HLKEyGOdAPmaqmQhjtjHtMjGZBwm+Z3vMEmRiVBE66cqqWIwfJR2T5sgHR/dKV6dA5 d9kvehOGdv/pdvagAMhtyTUyhHCtYBb3SuMpyAbLwqMThND8Pigc4rqHPM3pjnVxi0HS moBmgoPwAqY2oL/1hTeYwb5kZ6J/k2/uS+DSORwq0nnMY8EN2KaX7/jiA8BV5olS6tXc 5+0S+HHoKyDdYdJ3moqTXqZRBDwG4DDyAWt/cdrtAna5h4galD/d1XC+upUibr/oHeUe EO0XmT9NIJ2w5eGlHNV4xu/TSynXZyj4SNJE8GlN/NCDIvqRDS+NvH4pJjYVuTsjdsmA Ir7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jkNRx4Xq; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-149967-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149967-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u4-20020ae9c004000000b0078a4137f778si1192864qkk.227.2024.04.18.04.29.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149967-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jkNRx4Xq; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-149967-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149967-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 057341C20B8C for ; Thu, 18 Apr 2024 11:29:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22E4715E7F7; Thu, 18 Apr 2024 11:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jkNRx4Xq" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A3CB15E5CF; Thu, 18 Apr 2024 11:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713439734; cv=none; b=PqobPgp9q+heto02+ERQXRFGAbLqq+UwQSUlk/djH1bA3wmXqPlaxdhxkwNaqDffZmMp/rI+77lczz/eOchsLHPbEf+LWPaby/l4kam9QLXUYpFZCzRWYJqojE9UdzSx/q+VqQ99WvocVOyyHlJ5ay30kmIpp/I3nbnr4ZmEdLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713439734; c=relaxed/simple; bh=3Bh5oclFR3QPm4tVo625Fl3eZk/+YVvGQI5CcaxWhts=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=XuWdpX0UYvqqYSjbVtu/8WBRrV7YQ2UylUvgOiCW6Wm3xfF0TW8XEdzfljY/BG27FRy7h67LgD80HejyMloGmkkygP16GRL8IO+28uhli41vEg3WhefuTUVpQyBtFg4vOeJuC+AwJFfDARu996qiu0DMP0yLXSwT9R9rcyTJL9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jkNRx4Xq; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 8EBCEE0005; Thu, 18 Apr 2024 11:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713439729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0leo610WlDW38GlBTuA6KaiVJk/RBRpUySYdLn+9iHg=; b=jkNRx4XqaIlhhBjnuPtotUoFCPFp47uFHMSteuYl9/ut4lYhjbBR7khEc2/pPzfflHEaY8 o6TDjg9x7jB0QJQablKWQmhWRnjSfR+9pj5yzq8qS9et35nPEwtLPYRNs2jcL50iew6RrZ jy2WZE7e4PWPBm+22/Hcce2tW6xtUXqyvyQIY5h8EWeNOEed8qDfS8rr4IYJnJBhv2ZsIb ag7yIGnRm+vZ87IV2yrX5h+Zkwk3ohHCvZTKgrHQeFgiLMaYp3dAQ+po+yulLsm9aao/rC 846ulilKBsOI6cvveqEg+X2s7xT1jIDXMo/SlXT76QZVQ99TlEqSbVf05I4pYQ== Date: Thu, 18 Apr 2024 13:29:25 +0200 (CEST) From: Romain Gantois To: Serge Semin cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Yanteng Si , Romain Gantois , Maxime Coquelin , 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: Re: [PATCH net-next v2 1/2] net: stmmac: Rename phylink_get_caps() callback to update_caps() In-Reply-To: <20240417140013.12575-2-fancer.lancer@gmail.com> Message-ID: <8f893436-018e-73d8-15b1-8037af5b4f04@bootlin.com> References: <20240417140013.12575-1-fancer.lancer@gmail.com> <20240417140013.12575-2-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-Type: text/plain; charset=US-ASCII X-GND-Sasl: romain.gantois@bootlin.com On Wed, 17 Apr 2024, Serge Semin wrote: > 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 > > Reviewed-by: Romain Gantois Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com