fix(usb): Fix bug where usbh_process() misses an event

This commit fixes a bug where if multiple concurrent USBH API calls trigger
multiple events on the same device, some events will be lost. As a result,
those lost events don't get processed by the subsequent usbh_process() call.
pull/13294/head
Darian Leung 2024-02-24 03:24:23 +08:00
rodzic 12de4603c0
commit 3887441b37
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 8AC9127B487AA4EF
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -447,6 +447,8 @@ static bool _dev_set_actions(device_t *dev_obj, uint32_t action_flags)
dev_obj->dynamic.flags.in_pending_list = 1;
call_proc_req_cb = true;
} else {
// The device is already on the callback list, thus a processing request is already pending.
dev_obj->dynamic.action_flags |= action_flags;
call_proc_req_cb = false;
}
return call_proc_req_cb;