public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam()
@ 2026-03-17 20:22 Nicolai Buchwitz
  2026-03-18 11:19 ` Breno Leitao
  2026-03-19  2:44 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolai Buchwitz @ 2026-03-17 20:22 UTC (permalink / raw)
  To: nicolas.ferre, claudiu.beznea
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	Nicolai Buchwitz, Breno Leitao

macb_set_ringparam() silently ignores macb_open() failure after
closing and reopening the interface, always returning 0. Propagate
the error so callers know the interface failed to come back up.

Suggested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
 drivers/net/ethernet/cadence/macb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 83390dcc89e9..9957f5ae1752 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3754,7 +3754,7 @@ static int macb_set_ringparam(struct net_device *netdev,
 	bp->tx_ring_size = new_tx_size;
 
 	if (reset)
-		macb_open(bp->dev);
+		return macb_open(bp->dev);
 
 	return 0;
 }
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam()
  2026-03-17 20:22 [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam() Nicolai Buchwitz
@ 2026-03-18 11:19 ` Breno Leitao
  2026-03-19  2:44 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Breno Leitao @ 2026-03-18 11:19 UTC (permalink / raw)
  To: Nicolai Buchwitz
  Cc: nicolas.ferre, claudiu.beznea, andrew+netdev, davem, edumazet,
	kuba, pabeni, netdev

On Tue, Mar 17, 2026 at 09:22:29PM +0100, Nicolai Buchwitz wrote:
> macb_set_ringparam() silently ignores macb_open() failure after
> closing and reopening the interface, always returning 0. Propagate
> the error so callers know the interface failed to come back up.
> 
> Suggested-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>

Reviewed-by: Breno Leitao <leitao@debian.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam()
  2026-03-17 20:22 [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam() Nicolai Buchwitz
  2026-03-18 11:19 ` Breno Leitao
@ 2026-03-19  2:44 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-03-19  2:44 UTC (permalink / raw)
  To: Nicolai Buchwitz
  Cc: nicolas.ferre, claudiu.beznea, andrew+netdev, davem, edumazet,
	pabeni, netdev, Breno Leitao

On Tue, 17 Mar 2026 21:22:29 +0100 Nicolai Buchwitz wrote:
> macb_set_ringparam() silently ignores macb_open() failure after
> closing and reopening the interface, always returning 0. Propagate
> the error so callers know the interface failed to come back up.

Not sure it's worth it on its own, the driver will implode if the user
tries to change the config again or bring the device up or down.
The fact that error is nor propagated is the least of our worries.
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-19  2:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 20:22 [PATCH net-next] net: macb: propagate macb_open() failure in macb_set_ringparam() Nicolai Buchwitz
2026-03-18 11:19 ` Breno Leitao
2026-03-19  2:44 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox