From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Patrice Chotard <patrice.chotard@foss.st.com>, u-boot@lists.denx.de
Cc: Patrice CHOTARD <patrice.chotard@foss.st.com>,
Patrick DELAUNAY <patrick.delaunay@foss.st.com>,
U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>,
Neil Armstrong <neil.armstrong@linaro.org>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2] usb: gadget: f_mass_storage: Add schedule() in sleep_thread()
Date: Tue, 03 Dec 2024 10:47:35 +0100 [thread overview]
Message-ID: <87zfldnlmw.fsf@baylibre.com> (raw)
In-Reply-To: <20241202074644.5380-1-patrice.chotard@foss.st.com>
Hi Patrice,
Thank you for the patch.
On lun., déc. 02, 2024 at 08:46, Patrice Chotard <patrice.chotard@foss.st.com> wrote:
> In case "ums" command is used on platforms which don't implement
> g_dnl_board_usb_cable_connected() and USB cable is not connected,
> we stay inside sleep_thread() forever and watchdog is triggered.
>
> Add schedule() call to avoid this issue.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>
> ---
>
> Changes in v2:
> - move schedule() right before dm_usb_gadget_handle_interrupts()
>
> drivers/usb/gadget/f_mass_storage.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
> index ffe1ae6eb73..d3fc4acb401 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -682,6 +682,7 @@ static int sleep_thread(struct fsg_common *common)
> k = 0;
> }
>
> + schedule();
> dm_usb_gadget_handle_interrupts(udcdev);
> }
> common->thread_wakeup_needed = 0;
> --
> 2.25.1
next prev parent reply other threads:[~2024-12-03 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 7:46 [PATCH v2] usb: gadget: f_mass_storage: Add schedule() in sleep_thread() Patrice Chotard
2024-12-03 1:02 ` Marek Vasut
2024-12-03 8:53 ` Patrice CHOTARD
2024-12-03 9:47 ` Mattijs Korpershoek [this message]
2025-02-10 10:28 ` Patrice CHOTARD
2025-02-10 13:42 ` Marek Vasut
2025-02-11 7:54 ` Mattijs Korpershoek
2025-02-11 8:24 ` Patrice CHOTARD
2025-02-11 7:59 ` 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=87zfldnlmw.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=caleb.connolly@linaro.org \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-stm32@st-md-mailman.stormreply.com \
/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