From 60ac6fe3ad4b0cc544d4a4f1c947baec9e079cbb Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sun, 27 Jul 2025 20:46:12 +0800 Subject: [PATCH] fix(port/ehci): remove usb_osal_msleep in critical section Signed-off-by: sakumisu <1203593632@qq.com> --- port/ehci/usb_hc_ehci.c | 3 +-- 1 file changed, 1 insertion(+), 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; }