ref: 650e5db5a2df96e8dc7a267e6831dbcce1bce9dc
parent: c5c159b17a09fd46e0ad39d9049545525a2f1a62
author: cinap_lenrek <[email protected]>
date: Wed Feb 7 13:13:22 EST 2018
usbxhci: fix mistake in completering() the td index "x" was incremented twice, once in for loop and in the body expression. so r->rp only got updated every second completion. this is wrong, but harmless.
--- a/sys/src/9/pc/usbxhci.c
+++ b/sys/src/9/pc/usbxhci.c
@@ -800,7 +800,7 @@
pa = (*(u64int*)er) & ~15ULL;
ilock(r);
- for(x = r->rp; (int)(r->wp - x) > 0; x++){
+ for(x = r->rp; (int)(r->wp - x) > 0;){
td = &r->base[4*(x++ & r->mask)];
if((u64int)PADDR(td) == pa){
r->rp = x;