From e550fb11c395dc391eca3b410260de33af9e5b62 Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Mon, 2 Jun 2025 17:40:04 +0800 Subject: [PATCH] fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE 11382a2a fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE Co-authored-by: Roman Leonov --- components/usb/ext_hub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/usb/ext_hub.c b/components/usb/ext_hub.c index 55d4205b84..0260f8cd7c 100644 --- a/components/usb/ext_hub.c +++ b/components/usb/ext_hub.c @@ -1065,6 +1065,11 @@ static bool device_set_next_stage(ext_hub_dev_t *ext_hub_dev, bool last_stage_pa } else { // Terminal stages, move to IDLE next_stage = EXT_HUB_STAGE_IDLE; + EXT_HUB_ENTER_CRITICAL(); + if (ext_hub_dev->dynamic.flags.waiting_release) { + call_proc_req_cb = _device_set_actions(ext_hub_dev, DEV_ACTION_RELEASE); + } + EXT_HUB_EXIT_CRITICAL(); } ext_hub_dev->single_thread.stage = next_stage; call_proc_req_cb = stage_need_process(next_stage);