summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-07-27 20:46:12 +0800
committersakumisu <[email protected]>2025-07-27 20:46:12 +0800
commit60ac6fe3ad4b0cc544d4a4f1c947baec9e079cbb (patch)
treefe5ff4e12e05875db548946cd00351d546d693dd
parent0986e8b5ec1eae0c91e0c67b24e1e1e87a1c9270 (diff)
fix(port/ehci): remove usb_osal_msleep in critical section
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--port/ehci/usb_hc_ehci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/port/ehci/usb_hc_ehci.c b/port/ehci/usb_hc_ehci.c
index 3ad7c9b9..e432a3f7 100644
--- a/port/ehci/usb_hc_ehci.c
+++ b/port/ehci/usb_hc_ehci.c
@@ -1349,9 +1349,8 @@ int usbh_kill_urb(struct usbh_urb *urb)
volatile uint32_t timeout = 0;
EHCI_HCOR->usbcmd |= EHCI_USBCMD_IAAD;
while (!(EHCI_HCOR->usbsts & EHCI_USBSTS_IAA)) {
- usb_osal_msleep(1);
timeout++;
- if (timeout > 100) {
+ if (timeout > 20000) {
usb_osal_leave_critical_section(flags);
return -USB_ERR_TIMEOUT;
}