ref: 88181e1c5c8d19e61c76b93620abcbc7c2e57481
parent: a04fd342727c329584a9f443092caf21e3884bdf
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 30 21:36:13 EDT 2023
usbxhci: fix command ring wrap crash When a ring wraps around, we need to program a wrap around td with the base address. To get the base, we need to call Ctlr.dmaaddr() and we used the slot->ctlr pointer to get to it. But the command ring has no slot associated to it so we would crash as soon as we tried to submit more than 256 controller commands. The solution is to put a ctlr pointer into the Ring structure, which also allows us to simplify resetring() and waittd() as they now can get the controller implicitely thru the ring pointer.