summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-04-10 02:40:09 +0700
committerhathach <[email protected]>2013-04-10 02:40:09 +0700
commitfffe8b547dbdfba227b955fae0347258b19495b4 (patch)
treed29c8ed123576a5751dcf1fa9f412409eaf5c3ed
parent2d7fbb5153dcbeedf01378d1a02b8fe6e4ed400f (diff)
- ehci: free error TD for recovery
-rw-r--r--tinyusb/host/ehci/ehci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index df3faebcb..5d1ba0bdd 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -561,13 +561,17 @@ void xfer_error_isr(uint8_t hostid)
//p_qhd->qtd_overlay.non_hs_period_missed_uframe || p_qhd->qtd_overlay.pingstate_err TODO split transaction error
(p_qhd->device_address != 0 && p_qhd->qtd_overlay.halted) ) // addr0 cannot be protocol STALL
{
+ hal_debugger_breakpoint();
+
+ p_qhd->p_qtd_list_head->used = 0; // free QTD
+ qtd_remove_1st_from_qhd(p_qhd);
+
pipe_handle_t pipe_hdl = { .dev_addr = p_qhd->device_address };
if (p_qhd->endpoint_number) // if not Control, can only be Bulk
{
pipe_hdl.xfer_type = TUSB_XFER_BULK;
pipe_hdl.index = qhd_get_index(p_qhd);
}
- hal_debugger_breakpoint();
usbh_isr( pipe_hdl, p_qhd->class_code, TUSB_EVENT_XFER_ERROR); // call USBH callback
}