[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce9f7693-355a-4049-98a8-b8bd25b4d3e1@intel.com>
Date: Tue, 18 Feb 2025 12:17:35 +0100
From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
<netdev@...r.kernel.org>
CC: Alexandre Torgue <alexandre.torgue@...s.st.com>, Andrew Lunn
<andrew+netdev@...n.ch>, Chen-Yu Tsai <wens@...e.org>, "David S. Miller"
<davem@...emloft.net>, Drew Fustini <drew@...7.com>, Emil Renner Berthing
<kernel@...il.dk>, Eric Dumazet <edumazet@...gle.com>, Fabio Estevam
<festevam@...il.com>, Fu Wei <wefu@...hat.com>, Guo Ren <guoren@...nel.org>,
<imx@...ts.linux.dev>, Jakub Kicinski <kuba@...nel.org>, Jan Petrous
<jan.petrous@....nxp.com>, Jernej Skrabec <jernej.skrabec@...il.com>, "Jerome
Brunet" <jbrunet@...libre.com>, Kevin Hilman <khilman@...libre.com>,
<linux-amlogic@...ts.infradead.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-arm-msm@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
<linux-stm32@...md-mailman.stormreply.com>, <linux-sunxi@...ts.linux.dev>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, Minda Chen <minda.chen@...rfivetech.com>, "Neil
Armstrong" <neil.armstrong@...aro.org>, Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@...hiba.co.jp>, NXP S32 Linux Team <s32@....com>, "Paolo
Abeni" <pabeni@...hat.com>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Samuel Holland <samuel@...lland.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, Vinod Koul <vkoul@...nel.org>
Subject: Re: [PATCH net-next 1/3] net: stmmac: clarify priv->pause and pause
module parameter
On 2/18/2025 11:24 AM, Russell King (Oracle) wrote:
> priv->pause corresponds with "pause_time" in the 802.3 specification,
> and is also called "pause_time" in the various MAC backends. For
> consistency, use the same name in the core stmmac code.
>
> Clarify the units of the "pause" module parameter which sets up this
> struct member to indicate that it's in units of the pause_quanta
> defined by 802.3, which is 512 bit times.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +-
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index f05cae103d83..c602ace572b2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -283,7 +283,7 @@ struct stmmac_priv {
>
> int speed;
> unsigned int flow_ctrl;
> - unsigned int pause;
> + unsigned int pause_time;
> struct mii_bus *mii;
>
> struct phylink_config phylink_config;
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index fd8ca1524e43..c3a13bd8c9b3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -94,7 +94,7 @@ MODULE_PARM_DESC(flow_ctrl, "Flow control ability [on/off]");
>
> static int pause = PAUSE_TIME;
> module_param(pause, int, 0644);
> -MODULE_PARM_DESC(pause, "Flow Control Pause Time");
> +MODULE_PARM_DESC(pause, "Flow Control Pause Time (units of 512 bit times)");
>
> #define TC_DEFAULT 64
> static int tc = TC_DEFAULT;
> @@ -865,7 +865,7 @@ static void stmmac_mac_flow_ctrl(struct stmmac_priv *priv, u32 duplex)
> u32 tx_cnt = priv->plat->tx_queues_to_use;
>
> stmmac_flow_ctrl(priv, priv->hw, duplex, priv->flow_ctrl,
> - priv->pause, tx_cnt);
> + priv->pause_time, tx_cnt);
> }
>
> static unsigned long stmmac_mac_get_caps(struct phylink_config *config,
> @@ -7404,7 +7404,7 @@ int stmmac_dvr_probe(struct device *device,
> return -ENOMEM;
>
> stmmac_set_ethtool_ops(ndev);
> - priv->pause = pause;
> + priv->pause_time = pause;
> priv->plat = plat_dat;
> priv->ioaddr = res->addr;
> priv->dev->base_addr = (unsigned long)res->addr;
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
Powered by blists - more mailing lists