From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
<netdev@vger.kernel.org>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, Chen-Yu Tsai <wens@csie.org>,
"David S. Miller" <davem@davemloft.net>,
Drew Fustini <drew@pdp7.com>,
Emil Renner Berthing <kernel@esmil.dk>,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>, Fu Wei <wefu@redhat.com>,
Guo Ren <guoren@kernel.org>, <imx@lists.linux.dev>,
Jakub Kicinski <kuba@kernel.org>,
Jan Petrous <jan.petrous@oss.nxp.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
<linux-amlogic@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-arm-msm@vger.kernel.org>,
<linux-riscv@lists.infradead.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-sunxi@lists.linux.dev>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Minda Chen <minda.chen@starfivetech.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
NXP S32 Linux Team <s32@nxp.com>,
"Paolo Abeni" <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Samuel Holland <samuel@sholland.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>, Vinod Koul <vkoul@kernel.org>
Subject: Re: [PATCH net-next 1/3] net: stmmac: clarify priv->pause and pause module parameter
Date: Tue, 18 Feb 2025 12:17:35 +0100 [thread overview]
Message-ID: <ce9f7693-355a-4049-98a8-b8bd25b4d3e1@intel.com> (raw)
In-Reply-To: <E1tkKmD-004ObA-9K@rmk-PC.armlinux.org.uk>
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@armlinux.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@intel.com>
next prev parent reply other threads:[~2025-02-18 11:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 10:24 [PATCH net-next 0/3] net: stmmac: further cleanups Russell King (Oracle)
2025-02-18 10:24 ` [PATCH net-next 1/3] net: stmmac: clarify priv->pause and pause module parameter Russell King (Oracle)
2025-02-18 11:17 ` Mateusz Polchlopek [this message]
2025-02-18 10:24 ` [PATCH net-next 2/3] net: stmmac: remove useless priv->flow_ctrl Russell King (Oracle)
2025-02-18 16:02 ` Andrew Lunn
2025-02-19 1:11 ` nobuhiro1.iwamatsu
2025-02-18 10:24 ` [PATCH net-next 3/3] net: stmmac: "speed" passed to fix_mac_speed is an int Russell King (Oracle)
2025-02-18 12:29 ` Chen-Yu Tsai
2025-02-18 16:04 ` Andrew Lunn
2025-02-19 1:08 ` nobuhiro1.iwamatsu
2025-02-20 3:10 ` [PATCH net-next 0/3] net: stmmac: further cleanups patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce9f7693-355a-4049-98a8-b8bd25b4d3e1@intel.com \
--to=mateusz.polchlopek@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=drew@pdp7.com \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=guoren@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jan.petrous@oss.nxp.com \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=kernel@esmil.dk \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=kuba@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=martin.blumenstingl@googlemail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=minda.chen@starfivetech.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=s.hauer@pengutronix.de \
--cc=s32@nxp.com \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.org \
--cc=wefu@redhat.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox