1
0
mirror of https://github.com/gdsports/USBHost_t36 synced 2025-02-17 07:20:25 -05:00

Fix backward followup linking when creating a qTD group

This commit is contained in:
PaulStoffregen 2017-02-08 06:46:42 -08:00
parent 46324071f0
commit a649cbe12b

View File

@ -609,12 +609,13 @@ bool new_Transfer(Pipe_t *pipe, void *buffer, uint32_t len)
Transfer_t *prev = NULL; Transfer_t *prev = NULL;
Transfer_t *p = halt; Transfer_t *p = halt;
while (p->qtd.next != (uint32_t)transfer) { while (p->qtd.next != (uint32_t)transfer) {
Transfer_t *n = (Transfer_t *)p->qtd.next; Transfer_t *next = (Transfer_t *)p->qtd.next;
p->prev_followup = prev; p->prev_followup = prev;
p->next_followup = n; p->next_followup = next;
prev = p; prev = p;
p = n; p = next;
} }
p->prev_followup = prev;
p->next_followup = NULL; p->next_followup = NULL;
print(halt, p); print(halt, p);
// add them to a followup list // add them to a followup list