* [PATCH] net: am65-cpsw-nuss: fix common enable counter
@ 2025-04-29 14:05 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2025-04-29 14:05 UTC (permalink / raw)
To: Barebox List
The cpsw common is ought to be reference counted, but the reference
counter is only ever increased to one. Increase the reference for
additional am65_cpsw_common_start() calls.
This fixes a warning when barebox is shut down:
ERROR: 8000000.ethernet@8000000.of: dma failed with -22
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/net/am65-cpsw-nuss.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/am65-cpsw-nuss.c b/drivers/net/am65-cpsw-nuss.c
index 651b0b29cf..6b5a5d9533 100644
--- a/drivers/net/am65-cpsw-nuss.c
+++ b/drivers/net/am65-cpsw-nuss.c
@@ -274,8 +274,10 @@ static int am65_cpsw_common_start(struct am65_cpsw_common *common)
struct am65_cpsw_port *port0 = &common->ports[0];
int ret, i;
- if (common->started)
+ if (common->started) {
+ common->started++;
return 0;
+ }
ret = clk_enable(common->fclk);
if (ret) {
--
2.39.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-29 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 14:05 [PATCH] net: am65-cpsw-nuss: fix common enable counter Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox