From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1] dfu: Reset timeout in case of DFU request
Date: Mon, 17 Feb 2020 10:20:43 +0200 [thread overview]
Message-ID: <20200217082043.GR10400@smile.fi.intel.com> (raw)
In-Reply-To: <20200129152314.86550-1-andriy.shevchenko@linux.intel.com>
On Wed, Jan 29, 2020 at 05:23:14PM +0200, Andy Shevchenko wrote:
> In case dfu command is being executed with timeout option,
> the timer may expire in the middle of DFU operation. If there
> is DFU request coming, we may simple reset timeout value
> to prevent aborting of ongoing DFU operation.
>
Any news here? Can we get this applied for the 2020.04 release?
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/usb/gadget/f_dfu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
> index 6756155133..a4a57ba5f5 100644
> --- a/drivers/usb/gadget/f_dfu.c
> +++ b/drivers/usb/gadget/f_dfu.c
> @@ -596,6 +596,11 @@ dfu_handle(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
> debug("req_type: 0x%x ctrl->bRequest: 0x%x f_dfu->dfu_state: 0x%x\n",
> req_type, ctrl->bRequest, f_dfu->dfu_state);
>
> +#ifdef CONFIG_DFU_TIMEOUT
> + /* Forbid aborting by timeout. Next dfu command may update this */
> + dfu_set_timeout(0);
> +#endif
> +
> if (req_type == USB_TYPE_STANDARD) {
> if (ctrl->bRequest == USB_REQ_GET_DESCRIPTOR &&
> (w_value >> 8) == DFU_DT_FUNC) {
> --
> 2.24.1
>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2020-02-17 8:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 15:23 [PATCH v1] dfu: Reset timeout in case of DFU request Andy Shevchenko
2020-01-30 9:27 ` Ferry Toth
2020-02-10 16:42 ` Andy Shevchenko
2020-02-17 8:20 ` Andy Shevchenko [this message]
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=20200217082043.GR10400@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.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