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.
This commit is contained in:
cinap_lenrek 2018-02-07 18:13:22 +01:00
parent c5c159b17a
commit 650e5db5a2

View file

@ -800,7 +800,7 @@ completering(Ring *r, u32int *er)
pa = (*(u64int*)er) & ~15ULL; pa = (*(u64int*)er) & ~15ULL;
ilock(r); 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)]; td = &r->base[4*(x++ & r->mask)];
if((u64int)PADDR(td) == pa){ if((u64int)PADDR(td) == pa){
r->rp = x; r->rp = x;