diff options
| author | sakumisu <[email protected]> | 2025-09-27 22:18:10 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-09-27 22:21:15 +0800 |
| commit | 1b973b5cc5e188dc3357c4d65a49a47400a7dafe (patch) | |
| tree | a59233459aa26a01a7887c27c4a79f8bdcf0b686 | |
| parent | 102af3be37da5123f48d673a073f3ec34386d20d (diff) | |
fix(port/ehci): clear iaad status before set
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | port/ehci/usb_hc_ehci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/port/ehci/usb_hc_ehci.c b/port/ehci/usb_hc_ehci.c index 2ebe1134..e278f523 100644 --- a/port/ehci/usb_hc_ehci.c +++ b/port/ehci/usb_hc_ehci.c @@ -1337,6 +1337,7 @@ int usbh_kill_urb(struct usbh_urb *urb) EHCI_HCOR->usbcmd |= (EHCI_USBCMD_PSEN | EHCI_USBCMD_ASEN); qh = (struct ehci_qh_hw *)urb->hcpriv; + qh->remove_in_iaad = 0; urb->errorcode = -USB_ERR_SHUTDOWN; if (urb->timeout) { @@ -1347,6 +1348,7 @@ int usbh_kill_urb(struct usbh_urb *urb) if (remove_in_iaad) { volatile uint32_t timeout = 0; + EHCI_HCOR->usbsts = EHCI_USBSTS_IAA; EHCI_HCOR->usbcmd |= EHCI_USBCMD_IAAD; while (!(EHCI_HCOR->usbsts & EHCI_USBSTS_IAA)) { timeout++; |
