From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <florian.fainelli@broadcom.com>
Cc: netdev@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
Doug Berger <opendmb@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Antoine Tenart <atenart@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Yajun Deng <yajun.deng@linux.dev>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: bcmgenet: Support calling set_pauseparam from panic context
Date: Mon, 3 Nov 2025 15:00:21 -0800 [thread overview]
Message-ID: <1ce81ce5-1c09-4663-915b-16ee58e19035@broadcom.com> (raw)
In-Reply-To: <f9a32e33-9481-4fb7-8834-b36d88147dc2@lunn.ch>
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.
>
> Maybe rather than overload set_pauseparams, maybe add a new ethtool
> call to force pause off?
Yes, I like that idea, that way it is clear which drivers support
disabling pause from a panic context.
>
> 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);
Yes, that is essentially what needs to be done.
Thanks!
--
Florian
next prev parent reply other threads:[~2025-11-03 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 19:46 [PATCH net-next 0/2] Allow disabling pause frames on panic Florian Fainelli
2025-11-03 19:46 ` [PATCH net-next 1/2] net: ethernet: Allow disabling pause " Florian Fainelli
2025-11-03 22:08 ` Andrew Lunn
2025-11-03 19:46 ` [PATCH net-next 2/2] net: bcmgenet: Support calling set_pauseparam from panic context Florian Fainelli
2025-11-03 22:19 ` Andrew Lunn
2025-11-03 23:00 ` Florian Fainelli [this message]
2025-11-04 4:14 ` Andrew Lunn
2025-11-03 23:22 ` [PATCH net-next 0/2] Allow disabling pause frames on panic Jakub Kicinski
2025-11-03 23:34 ` Florian Fainelli
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=1ce81ce5-1c09-4663-915b-16ee58e19035@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=yajun.deng@linux.dev \
/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
all inboxes | Powered by JetHome®