mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: pse-pd: fix bogus budget evaluation strategy check in IRQ handler
@ 2026-11-26 14:30 Kory Maincent
  0 siblings, 0 replies; only message in thread
From: Kory Maincent @ 2026-11-26 14:30 UTC (permalink / raw)
  To: Kory Maincent (Dent Project),
	Oleksij Rempel, Jakub Kicinski, Paolo Abeni, netdev,
	linux-kernel
  Cc: thomas.petazzoni, Andrew Lunn, David S. Miller, Eric Dumazet

pse_set_config_isr() wrongly tested the PSE event notification bitmask
against PSE_BUDGET_EVAL_STRAT_DYNAMIC, a budget evaluation strategy
constant that has nothing to do with event notifications.

The mistake went unnoticed because ETHTOOL_C33_PSE_EVENT_DETECTION and
PSE_BUDGET_EVAL_STRAT_DYNAMIC are both BIT(2) and, when only the
detection event is reported, the function performs no action anyway.
The check does not prevent the TPS23881 from working properly, but when
a controller reports the detection event together with other events,
the whole notification handling is skipped instead of processed.

Remove this bogus check.

Fixes: ffef61d6d2737 ("net: pse-pd: Add support for budget evaluation strategies")
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Found this issue while developing the support for the TPS23861 version of
the controller.

As the TPS23881 driver (the only user of this path) works fine with this
bogus check, I am sending the fix to net-next.

If any developer of the SUIE or Sashiko passes by, I would like to point
out that all my PSE patches and fixes are registered under the DENT
company, which is wrong as I am not working for them anymore.
---
 drivers/net/pse-pd/pse_core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c
index a3d4a3d7e5257..59cc0dcfa2a4b 100644
--- a/drivers/net/pse-pd/pse_core.c
+++ b/drivers/net/pse-pd/pse_core.c
@@ -1205,9 +1205,6 @@ static int pse_set_config_isr(struct pse_controller_dev *pcdev, int id,
 {
 	int ret = 0;
 
-	if (notifs & PSE_BUDGET_EVAL_STRAT_DYNAMIC)
-		return 0;
-
 	if ((notifs & ETHTOOL_C33_PSE_EVENT_DISCONNECTION) &&
 	    ((notifs & ETHTOOL_C33_PSE_EVENT_DETECTION) ||
 	     (notifs & ETHTOOL_C33_PSE_EVENT_CLASSIFICATION))) {
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-26 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 14:30 [PATCH net-next] net: pse-pd: fix bogus budget evaluation strategy check in IRQ handler Kory Maincent

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®