|
|
|
|
|
|
|
|
// find & free all the transfers which completed |
|
|
// find & free all the transfers which completed |
|
|
println(" Free transfers"); |
|
|
println(" Free transfers"); |
|
|
Transfer_t *t = async_followup_first; |
|
|
Transfer_t *t = async_followup_first; |
|
|
#if 0 |
|
|
|
|
|
if (t) { |
|
|
|
|
|
println(" (Look at QH list first)"); |
|
|
|
|
|
Transfer_t *tr = (Transfer_t *)(pipe->qh.next); |
|
|
|
|
|
while ((uint32_t)tr & 0xFFFFFFE0) { |
|
|
|
|
|
println(" $ ", (uint32_t)tr); |
|
|
|
|
|
tr = (Transfer_t *)(tr->qtd.next); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
while (t) { |
|
|
while (t) { |
|
|
print(" * ", (uint32_t)t); |
|
|
print(" * ", (uint32_t)t); |
|
|
Transfer_t *next = t->next_followup; |
|
|
Transfer_t *next = t->next_followup; |
|
|
|
|
|
|
|
|
// TODO: subtract bandwidth from uframe_bandwidth array |
|
|
// TODO: subtract bandwidth from uframe_bandwidth array |
|
|
|
|
|
|
|
|
// find & free all the transfers which completed |
|
|
// find & free all the transfers which completed |
|
|
|
|
|
println(" Free transfers"); |
|
|
Transfer_t *t = periodic_followup_first; |
|
|
Transfer_t *t = periodic_followup_first; |
|
|
while (t) { |
|
|
while (t) { |
|
|
|
|
|
print(" * ", (uint32_t)t); |
|
|
Transfer_t *next = t->next_followup; |
|
|
Transfer_t *next = t->next_followup; |
|
|
if (t->pipe == pipe) { |
|
|
if (t->pipe == pipe) { |
|
|
|
|
|
print(" * remove"); |
|
|
remove_from_periodic_followup_list(t); |
|
|
remove_from_periodic_followup_list(t); |
|
|
free_Transfer(t); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only free if not in QH list |
|
|
|
|
|
Transfer_t *tr = (Transfer_t *)(pipe->qh.next); |
|
|
|
|
|
while (((uint32_t)tr & 0xFFFFFFE0) && (tr != t)){ |
|
|
|
|
|
tr = (Transfer_t *)(tr->qtd.next); |
|
|
|
|
|
} |
|
|
|
|
|
if (tr == t) { |
|
|
|
|
|
println(" * defer free until QH"); |
|
|
|
|
|
} else { |
|
|
|
|
|
println(" * free"); |
|
|
|
|
|
free_Transfer(t); // The later code should actually free it... |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
println(""); |
|
|
} |
|
|
} |
|
|
t = next; |
|
|
t = next; |
|
|
} |
|
|
} |