-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[host] abort all pending transfer when SET_CONFIGURATION is complete #2503
Conversation
…NFIGURATION is successful - usbh: abort all pending xfer when SET_CONFIGURATION is complete - use tu_edpt_release in tuh_edpt_abort_xfer instead of usbh_edpt_release - rename _xfer_complete -> _control_xfer_complete
case CONTROL_STAGE_ACK: | ||
_xfer_complete(dev_addr, result); | ||
break; | ||
case CONTROL_STAGE_ACK: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abort all pending transfer when SET_CONFIGURATION is complete
@@ -741,7 +743,7 @@ bool tuh_edpt_abort_xfer(uint8_t daddr, uint8_t ep_addr) { | |||
TU_VERIFY(hcd_edpt_abort_xfer(dev->rhport, daddr, ep_addr)); | |||
// mark as ready and release endpoint if transfer is aborted | |||
dev->ep_status[epnum][dir].busy = false; | |||
usbh_edpt_release(daddr, ep_addr); | |||
tu_edpt_release(&dev->ep_status[epnum][dir], _usbh_mutex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu_edpt_release() is lighter version
|
||
dev->configured = 1; | ||
|
||
// Parse configuration & set up drivers | ||
// driver_open() must not make any usb transfer | ||
TU_ASSERT(_parse_configuration_descriptor(daddr, (tusb_desc_configuration_t*) _usbh_ctrl_buf),); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move _parse_configuration_descriptor() from pre to post SET_CONNFIGURATION
Describe the PR
fix an issue with circuitpython adafruit/circuitpython#8885