From 9129f2f16488e95f8a71bb87937397aaf333bc1b Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 22 Dec 2020 11:32:23 +0100 Subject: dfu: add support for the dfu_alt_info reintialization from the flashed script Reinitialize DFU USB gadget after flashing the 'SCRIPT' entity to ensure that the potential changes to the 'dfu_alt_info' environment variable are applied. Signed-off-by: Marek Szyprowski [lukma - I've moved the bool retry to avoid build (CI) errors] --- common/dfu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/dfu.c') diff --git a/common/dfu.c b/common/dfu.c index d23cf67f19..16bd1ba588 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -98,6 +98,9 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) } #endif + if (dfu_reinit_needed) + goto exit; + WATCHDOG_RESET(); usb_gadget_handle_interrupts(usbctrl_index); } -- cgit v1.2.3