Skip to content

Commit 5f47d1a

Browse files
committed
fix(port/musb/usb_hc_musb): fix stall to stalled
Signed-off-by: sakumisu <[email protected]>
1 parent 64dced8 commit 5f47d1a

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

port/musb/usb_hc_musb.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -924,13 +924,6 @@ void handle_ep0(struct usbh_bus *bus)
924924
musb_urb_waitup(urb);
925925
return;
926926
}
927-
if (ep0_status & USB_CSRL0_STALL) {
928-
HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_CSRL0_STALL;
929-
pipe->ep0_state = USB_EP0_STATE_SETUP;
930-
urb->errorcode = -USB_ERR_STALL;
931-
musb_urb_waitup(urb);
932-
return;
933-
}
934927

935928
switch (pipe->ep0_state) {
936929
case USB_EP0_STATE_SETUP:
@@ -1097,8 +1090,8 @@ void USBH_IRQHandler(uint8_t busid)
10971090
HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_NAKTO;
10981091
urb->errorcode = -USB_ERR_NAK;
10991092
musb_urb_waitup(urb);
1100-
} else if (ep_csrl_status & USB_TXCSRL1_STALL) {
1101-
HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_STALL;
1093+
} else if (ep_csrl_status & USB_TXCSRL1_STALLED) {
1094+
HWREGB(USB_TXCSRL_BASE(ep_idx)) &= ~USB_TXCSRL1_STALLED;
11021095
urb->errorcode = -USB_ERR_STALL;
11031096
musb_urb_waitup(urb);
11041097
} else {
@@ -1146,8 +1139,8 @@ void USBH_IRQHandler(uint8_t busid)
11461139
HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_NAKTO;
11471140
urb->errorcode = -USB_ERR_NAK;
11481141
musb_urb_waitup(urb);
1149-
} else if (ep_csrl_status & USB_RXCSRL1_STALL) {
1150-
HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_STALL;
1142+
} else if (ep_csrl_status & USB_RXCSRL1_STALLED) {
1143+
HWREGB(USB_RXCSRL_BASE(ep_idx)) &= ~USB_RXCSRL1_STALLED;
11511144
urb->errorcode = -USB_ERR_STALL;
11521145
musb_urb_waitup(urb);
11531146
} else if (ep_csrl_status & USB_RXCSRL1_RXRDY) {

0 commit comments

Comments
 (0)