Skip to content

Commit

Permalink
MUSB Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
t123yh committed Dec 30, 2021
1 parent 47498c0 commit 8656b3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/portable/sunxi/dcd_sunxi_musb.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,12 @@ static bool edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_
_dcd.status_out = 0;
if (req == REQUEST_TYPE_INVALID) {
dcd_event_xfer_complete(rhport, ep_addr, total_bytes, XFER_RESULT_SUCCESS, false);
return true;
} else {
/* The next setup packet has already been received, it aborts
* invoking callback function to avoid confusing TUSB stack. */
TU_LOG1("Drop CONTROL_STAGE_ACK\n");
}
return true;
}
const unsigned dir_in = tu_edpt_dir(ep_addr);
if (tu_edpt_dir(req) == dir_in) { /* DATA stage */
Expand Down Expand Up @@ -713,7 +713,6 @@ static void process_ep0(uint8_t rhport)

unsigned req = _dcd.setup_packet.bmRequestType;
if (csrl & USB_CSRL0_SETEND) {
// TU_LOG1(" ABORT by the next packets\n");
USBC_Dev_Ctrl_ClearSetupEnd();
if (req != REQUEST_TYPE_INVALID && _dcd.pipe0.buf) {
/* DATA stage was aborted by receiving STATUS or SETUP packet. */
Expand Down

0 comments on commit 8656b3b

Please sign in to comment.