Re: [PATCH net-next 2/2] net: bcmgenet: Support calling set_pauseparam from panic context
From: Andrew Lunn
Date: Mon Nov 03 2025 - 17:19:45 EST
> @@ -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