UHCI using a second QH for STATUS
Posted: Mon Mar 20, 2023 11:09 pm
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.
bochsrc:It doesn't seem to have worked: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.
bochsrc:
Code: Select all
usb_uhci: enabled=1
usb_uhci: port1=disk:test.raw, option1="sect_size=512"
Code: Select all
sending 80 06 00 02 00 00 00 01
td[0] 5608460 .nxt=5608474 sts=9800000 ep= e0012d buf=5608340 qh0 = 5608460
td[1] 5608470 .nxt=5608484 sts=9800000 ep= 7e80169 buf=5608348
td[2] 5608480 .nxt=5608494 sts=9800000 ep= 7e00169 buf=5608388
td[3] 5608490 .nxt=56084a4 sts=9800000 ep= 7e80169 buf=56083c8
td[4] 56084a0 .nxt=56084b4 sts=9800000 ep= 7e00169 buf=5608408
td[5] 56084b0 .nxt=1 sts=9800000 ep=ffe801e1 buf=5608448 qh1 = 56084b0
...
td[0] sts=9000007
td[1] sts=900001f
td[2] sts=1400007 STALL
td[3] sts=9800000
td[4] sts=9800000
td[5] sts=1400007 STALL
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.