U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Stephan Gerhold <stephan.gerhold@linaro.org>,
	Lukasz Majewski <lukma@denx.de>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>,
	Loic Poulain <loic.poulain@oss.qualcomm.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 2/3] usb: gadget: f_acm: Allow restarting ACM console after stopping it
Date: Thu, 10 Apr 2025 14:16:45 +0200	[thread overview]
Message-ID: <87y0w8fbyq.fsf@baylibre.com> (raw)
In-Reply-To: <20250407-acm-fixes-v1-2-e3dcb592d6d6@linaro.org>

Hi Stephan,

Thank you for the patch.

On lun., avril 07, 2025 at 16:59, Stephan Gerhold <stephan.gerhold@linaro.org> wrote:

> When using IOMUX, the "usbacm" console can be added/removed dynamically
> from the stdout/stderr/stdin environment variables to allow temporarily
> starting other USB gadgets (e.g. Fastboot).
>
> However, right now acm_stdio_stop() does not completely undo
> acm_stdio_start(): The USB gadget is unregistered, but as long as dev->priv
> stays set acm_stdio_start() will never register the USB gadget again.
>
> Clear dev->priv after we detach to make sure a start operation after a stop
> operation registers the gadget again.
>
> Fixes: fc2b399ac03b ("usb: gadget: Add CDC ACM function")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

> ---
>  drivers/usb/gadget/f_acm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
> index 2665fa4168f99b35a8c595aa24cb3fc4e8ab8529..8f7256069f58527b2e43e5add725a0b5f06baa6d 100644
> --- a/drivers/usb/gadget/f_acm.c
> +++ b/drivers/usb/gadget/f_acm.c
> @@ -663,6 +663,7 @@ static int acm_stdio_stop(struct stdio_dev *dev)
>  {
>  	g_dnl_unregister();
>  	g_dnl_clear_detach();
> +	dev->priv = NULL;
>  
>  	return 0;
>  }
>
> -- 
> 2.47.2

  reply	other threads:[~2025-04-10 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 14:59 [PATCH 0/3] usb: gadget: Fix issues when using f_acm with ci_udc Stephan Gerhold
2025-04-07 14:59 ` [PATCH 1/3] usb: gadget: f_acm: Claim requested USB endpoints Stephan Gerhold
2025-04-10  9:58   ` Mattijs Korpershoek
2025-04-07 14:59 ` [PATCH 2/3] usb: gadget: f_acm: Allow restarting ACM console after stopping it Stephan Gerhold
2025-04-10 12:16   ` Mattijs Korpershoek [this message]
2025-04-07 14:59 ` [PATCH 3/3] usb: gadget: introduce 'enabled' flag in struct usb_ep Stephan Gerhold
2025-04-10 12:19   ` Mattijs Korpershoek
2025-04-23  7:51 ` [PATCH 0/3] usb: gadget: Fix issues when using f_acm with ci_udc Mattijs Korpershoek

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=87y0w8fbyq.fsf@baylibre.com \
    --to=mkorpershoek@kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=stephan.gerhold@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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