[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9a32e33-9481-4fb7-8834-b36d88147dc2@lunn.ch>
Date: Mon, 3 Nov 2025 23:19:19 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: netdev@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
Doug Berger <opendmb@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Antoine Tenart <atenart@...nel.org>,
Kuniyuki Iwashima <kuniyu@...gle.com>,
Yajun Deng <yajun.deng@...ux.dev>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: bcmgenet: Support calling
set_pauseparam from panic context
> @@ -139,7 +141,8 @@ void bcmgenet_phy_pause_set(struct net_device *dev, bool rx, bool tx)
> linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->advertising, rx);
> linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->advertising,
> rx | tx);
> - phy_start_aneg(phydev);
> + if (!panic_in_progress())
> + phy_start_aneg(phydev);
That does not look correct. If pause autoneg is off, there is no need
to trigger an autoneg.
This all looks pretty messy.
Maybe rather than overload set_pauseparams, maybe add a new ethtool
call to force pause off?
It looks like it would be something like:
struct bcmgenet_priv *priv = netdev_priv(dev);
u32 reg;
reg = bcmgenet_umac_readl(priv, UMAC_CMD);
reg &= ~(CMD_RX_PAUSE_IGNORE| CMD_TX_PAUSE_IGNORE);
bcmgenet_umac_writel(priv, reg, UMAC_CMD);
Andrew
Powered by blists - more mailing lists