diff options
| author | Liam Fraser <[email protected]> | 2021-11-05 09:39:31 +0000 |
|---|---|---|
| committer | Liam Fraser <[email protected]> | 2021-11-05 09:39:31 +0000 |
| commit | e692fa9ae4b6c8ff7b66dedbecaf745ae2166851 (patch) | |
| tree | b5f41331e6d31e8172fd5da44f7fd99c91c4d91f | |
| parent | c04006bc1386506bdea7660ad90fa25aab63c730 (diff) | |
RP2040 HCD: Move invalid ep->active assert in hw_trans_complete. The check for ep->active should only happen if a setup packet was just sent. Otherwise the transaction is handled in hw_handle_buff_status.
| -rw-r--r-- | src/portable/raspberrypi/rp2040/hcd_rp2040.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/portable/raspberrypi/rp2040/hcd_rp2040.c b/src/portable/raspberrypi/rp2040/hcd_rp2040.c index 627e957e8..768cccc86 100644 --- a/src/portable/raspberrypi/rp2040/hcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/hcd_rp2040.c @@ -160,12 +160,11 @@ static void hw_handle_buff_status(void) static void hw_trans_complete(void) { - struct hw_endpoint *ep = &epx; - assert(ep->active); - if (usb_hw->sie_ctrl & USB_SIE_CTRL_SEND_SETUP_BITS) { pico_trace("Sent setup packet\n"); + struct hw_endpoint *ep = &epx; + assert(ep->active); hw_xfer_complete(ep, XFER_RESULT_SUCCESS); } else |
