Re: [PATCH net-next 2/2] net: bcmgenet: Support calling set_pauseparam from panic context

From: Andrew Lunn
Date: Mon Nov 03 2025 - 23:15:39 EST


On Mon, Nov 03, 2025 at 03:00:21PM -0800, Florian Fainelli wrote:
> On 11/3/25 14:19, Andrew Lunn wrote:
> > > @@ -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.
>
> That is pre-existing code, so it would be a separate path in order to fix,
> though point taken.

Yes, i just noticed it in passing, a separate issue.

And by messy, i was meaning all the conditional locks. A new ethtool
op would avoid all that, and the new op is also really simple.

Andrew