ref: 0fe192bbc260725de0c2a7825832276eddd162fb
parent: 2a7db167bcc3735f7a69c2477610d2240c046aee
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat May 9 22:43:39 EDT 2020
usbxhci: fix wrong control endpoint 0 output device context address the calculation for the control endpoint0 output device context missed the context size scaling shift, resulting in botched stall handling as we would not read the correct endpoint status value. note, this calculation only affected control endpoint 0, which was handled separately from all other endpoints.
--- a/sys/src/9/port/usbxhci.c
+++ b/sys/src/9/port/usbxhci.c
@@ -1239,7 +1239,7 @@
slot->nep = 1;
ring->slot = slot;
ring->doorbell = &ctlr->dba[slot->id];
- ring->ctx = &slot->obase[8];
+ ring->ctx = &slot->obase[8<<ctlr->csz];
/* (input) control context */
w = slot->ibase;
--
⑨