From 11382a2aae73e92c1e9e5f33b4221b2ad01dce66 Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Wed, 21 May 2025 12:13:47 +0200 Subject: [PATCH] fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE --- 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 9fc2b8961f..44b81eb380 100644 --- a/components/usb/ext_hub.c +++ b/components/usb/ext_hub.c @@ -1064,6 +1064,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);