diff options
| author | sakumisu <[email protected]> | 2026-02-03 20:49:10 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2026-02-03 20:50:01 +0800 |
| commit | 5f47d1a6b6378e17a91a3dade770a1a1d2b7ee17 (patch) | |
| tree | 440f2215614cfcd5cd0a6e86316f6544295ef023 | |
| parent | 64dced8ec74a4d10952c0005f947736a4bf6ef9a (diff) | |
fix(port/musb/usb_hc_musb): fix stall to stalled
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | port/musb/usb_hc_musb.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/port/musb/usb_hc_musb.c b/port/musb/usb_hc_musb.c index 26d2ce74..b0c75009 100644 --- a/port/musb/usb_hc_musb.c +++ b/port/musb/usb_hc_musb.c @@ -924,13 +924,6 @@ void handle_ep0(struct usbh_bus *bus) musb_urb_waitup(urb); return; } - if (ep0_status & USB_CSRL0_STALL) { - HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_CSRL0_STALL; - pipe->ep0_state = USB_EP0_STATE_SETUP; - urb->errorcode = -USB_ERR_STALL; - musb_urb_waitup(urb); - return; - } switch (pipe->ep0_state) { case USB_EP0_STATE_SETUP: @@ -1097,8 +1090,8 @@ void USBH_IRQHandler(uint8_t busid) HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_NAKTO; urb->errorcode = -USB_ERR_NAK; musb_urb_waitup(urb); - } else if (ep_csrl_status & USB_TXCSRL1_STALL) { - HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_STALL; + } else if (ep_csrl_status & USB_TXCSRL1_STALLED) { + HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_STALLED; urb->errorcode = -USB_ERR_STALL; musb_urb_waitup(urb); } else { @@ -1146,8 +1139,8 @@ void USBH_IRQHandler(uint8_t busid) HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_NAKTO; urb->errorcode = -USB_ERR_NAK; musb_urb_waitup(urb); - } else if (ep_csrl_status & USB_RXCSRL1_STALL) { - HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_STALL; + } else if (ep_csrl_status & USB_RXCSRL1_STALLED) { + HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_STALLED; urb->errorcode = -USB_ERR_STALL; musb_urb_waitup(urb); } else if (ep_csrl_status & USB_RXCSRL1_RXRDY) { |
