summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-02-07 18:13:22 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-02-07 18:13:22 +0100
commit650e5db5a2df96e8dc7a267e6831dbcce1bce9dc (patch)
tree941eb4703b7d396df6ae1733d7dcbab3ac6a7f1c /sys/src
parentc5c159b17a09fd46e0ad39d9049545525a2f1a62 (diff)
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.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/9/pc/usbxhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/pc/usbxhci.c b/sys/src/9/pc/usbxhci.c
index 8925df257..489de15a3 100644
--- a/sys/src/9/pc/usbxhci.c
+++ b/sys/src/9/pc/usbxhci.c
@@ -800,7 +800,7 @@ completering(Ring *r, u32int *er)
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;