* [PATCH] IOMUX: Fix stopping unused dropped consoles
@ 2025-04-07 11:10 Stephan Gerhold
2025-04-07 12:17 ` Andy Shevchenko
2025-04-15 17:09 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Stephan Gerhold @ 2025-04-07 11:10 UTC (permalink / raw)
To: Tom Rini; +Cc: Andy Shevchenko, u-boot
iomux_match_device() returns -ENOENT instead of the end index, which means
console_stop() is never called at the moment for unused consoles.
This prevents e.g. f_acm from releasing the USB gadget interface when
removing it from stdio/stderr/stdin.
Fixes: b672c1619bb9 ("IOMUX: Split out iomux_match_device() helper")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
common/iomux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/iomux.c b/common/iomux.c
index 1224c15eb718b5e78f625f57274000114d85c7de..4844df51fbec645f54d14f31e34ed717da056667 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -131,7 +131,7 @@ int iomux_doenv(const int console, const char *arg)
/* Stop dropped consoles */
for (i = 0; i < repeat; i++) {
j = iomux_match_device(cons_set, cs_idx, old_set[i]);
- if (j == cs_idx)
+ if (j == -ENOENT)
console_stop(console, old_set[i]);
}
---
base-commit: 0efe8ea57fc7a1a6fc5f64fb3cf6bc4a1a4fc219
change-id: 20250407-iomux-stop-a5aabb6a4ec1
Best regards,
--
Stephan Gerhold <stephan.gerhold@linaro.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] IOMUX: Fix stopping unused dropped consoles
2025-04-07 11:10 [PATCH] IOMUX: Fix stopping unused dropped consoles Stephan Gerhold
@ 2025-04-07 12:17 ` Andy Shevchenko
2025-04-15 17:09 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-04-07 12:17 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: Tom Rini, u-boot
On Mon, Apr 07, 2025 at 01:10:00PM +0200, Stephan Gerhold wrote:
> iomux_match_device() returns -ENOENT instead of the end index, which means
> console_stop() is never called at the moment for unused consoles.
>
> This prevents e.g. f_acm from releasing the USB gadget interface when
> removing it from stdio/stderr/stdin.
Good catch!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IOMUX: Fix stopping unused dropped consoles
2025-04-07 11:10 [PATCH] IOMUX: Fix stopping unused dropped consoles Stephan Gerhold
2025-04-07 12:17 ` Andy Shevchenko
@ 2025-04-15 17:09 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-04-15 17:09 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: Andy Shevchenko, u-boot
On Mon, 07 Apr 2025 13:10:00 +0200, Stephan Gerhold wrote:
> iomux_match_device() returns -ENOENT instead of the end index, which means
> console_stop() is never called at the moment for unused consoles.
>
> This prevents e.g. f_acm from releasing the USB gadget interface when
> removing it from stdio/stderr/stdin.
>
>
> [...]
Applied to u-boot/master, thanks!
[1/1] IOMUX: Fix stopping unused dropped consoles
commit: 265420ebc10bc96275be5eb81fe6157d46e135d4
--
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-15 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 11:10 [PATCH] IOMUX: Fix stopping unused dropped consoles Stephan Gerhold
2025-04-07 12:17 ` Andy Shevchenko
2025-04-15 17:09 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox