From 74541f9cc4c3b7d258b02a746317e8e395599e5e Mon Sep 17 00:00:00 2001 From: Ryan Wendland Date: Sat, 4 Jun 2022 22:49:07 +0930 Subject: [PATCH] ohci: Set skip on ed prior to removal --- src/portable/ohci/ohci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/portable/ohci/ohci.c b/src/portable/ohci/ohci.c index 6ac752412..8b9fc8a2b 100644 --- a/src/portable/ohci/ohci.c +++ b/src/portable/ohci/ohci.c @@ -377,12 +377,16 @@ static void ed_list_remove_by_addr(ohci_ed_t * p_head, uint8_t dev_addr) if (ed->dev_addr == dev_addr) { + //Prevent Host Controller from processing this ED while we remove it + ed->skip = 1; + // unlink ed p_prev->next = ed->next; // point the removed ED's next pointer to list head to make sure HC can always safely move away from this ED ed->next = (uint32_t) p_head; ed->used = 0; + ed->skip = 0; continue; }