Skip to content

Commit f872621

Browse files
committed
ohci: Set skip on ed prior to removal
1 parent cc9c3fe commit f872621

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/portable/ohci/ohci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,16 @@ static void ed_list_remove_by_addr(ohci_ed_t * p_head, uint8_t dev_addr)
377377

378378
if (ed->dev_addr == dev_addr)
379379
{
380+
//Prevent Host Controller from processing this ED while we remove it
381+
ed->skip = 1;
382+
380383
// unlink ed
381384
p_prev->next = ed->next;
382385

383386
// point the removed ED's next pointer to list head to make sure HC can always safely move away from this ED
384387
ed->next = (uint32_t) p_head;
385388
ed->used = 0;
389+
ed->skip = 0;
386390
continue;
387391
}
388392

0 commit comments

Comments
 (0)