From a649cbe12bca813f0993a0392c0755f2b1a9fd13 Mon Sep 17 00:00:00 2001 From: PaulStoffregen Date: Wed, 8 Feb 2017 06:46:42 -0800 Subject: [PATCH] Fix backward followup linking when creating a qTD group --- k66_usbhost.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/k66_usbhost.ino b/k66_usbhost.ino index 0ebfc9f..a3c299b 100644 --- a/k66_usbhost.ino +++ b/k66_usbhost.ino @@ -609,12 +609,13 @@ bool new_Transfer(Pipe_t *pipe, void *buffer, uint32_t len) Transfer_t *prev = NULL; Transfer_t *p = halt; 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->next_followup = n; + p->next_followup = next; prev = p; - p = n; + p = next; } + p->prev_followup = prev; p->next_followup = NULL; print(halt, p); // add them to a followup list