Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
My UHCI driver uses two QHs for SETUP request. If the first QH doesn't use all the TDs, the UHCI controller will see the incomplete TD and stop processing. Then the second QH has just the STATUS packet.
The Bochs log says "STATUS: Packet Toggle indicator doesn't match Device Toggle indicator. 0 != 1"
I wasn't expecting Bit 0x400000 = STALL.
From the spec, I would've thought 0x10000000 = Short Packet Detect would be set for td[2]. And the second QH with td[5] I think would not have STALL set either.
Last edited by sounds on Tue Mar 21, 2023 9:18 am, edited 1 time in total.
SPD bit is not set by controller, it is set by you. If you do not set SPD bit, UHCI will not move to horizontal transfer in queue, but it will try to execute next vertical packet, what probably causes stall in your case, because first IN packet already returned all from descriptor.
It's not your fault, it's mine... :-) In my re-write of the UHCI emulation, I forgot to add that little part. Created the flag for it, but forgot to include the flag in the "next element" check.
I target Bochs as supported, so I was willing to "break" things to get it working, but it sounds like this isn't what Bochs is going to be doing either. Thank you for keeping the number of corner cases and exceptions down