]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: clarify priv->pause and pause module parameter
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 18 Feb 2025 10:24:29 +0000 (10:24 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 02:57:28 +0000 (18:57 -0800)
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>
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Link: https://patch.msgid.link/E1tkKmD-004ObA-9K@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index f05cae103d836c5dace6efff2ded4c73187648a0..c602ace572b2865602373672cff14b35073a36e2 100644 (file)
@@ -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;
index fd8ca1524e43bce612b6faadec63bb338ac93bf2..c3a13bd8c9b3041f83ce8c55d565aaeca481c714 100644 (file)
@@ -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;