mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: 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 23:19:19 +0100	[thread overview]
Message-ID: <f9a32e33-9481-4fb7-8834-b36d88147dc2@lunn.ch> (raw)
In-Reply-To: <20251103194631.3393020-3-florian.fainelli@broadcom.com>

> @@ -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

  reply	other threads:[~2025-11-03 22:19 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 [this message]
2025-11-03 23:00     ` Florian Fainelli
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=f9a32e33-9481-4fb7-8834-b36d88147dc2@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.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®