From b3c7fe1023d14d1e07eb21ca9a61438bff49a788 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 15 Aug 2023 00:09:31 +0700 Subject: [PATCH] clear qhd halted bit if not caused by STALL protocol, allow for next transfer --- src/portable/ehci/ehci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/portable/ehci/ehci.c b/src/portable/ehci/ehci.c index 79811985c..c5036b5a3 100644 --- a/src/portable/ehci/ehci.c +++ b/src/portable/ehci/ehci.c @@ -579,6 +579,7 @@ void qhd_xfer_complete_isr(ehci_qhd_t * qhd) { if (qtd_overlay->xact_err || qtd_overlay->err_count == 0 || qtd_overlay->buffer_err || qtd_overlay->babble_err) { // Error count = 0 often occurs when device disconnected, or other bus-related error xfer_result = XFER_RESULT_FAILED; + qtd_overlay->halted = false; // clear halted bit if it is not caused by STALL TU_LOG3(" QHD xfer err count: %d\n", qtd_overlay->err_count); // TU_BREAKPOINT(); // TODO skip unplugged device }else {