[Bug 1859378] Re: xhci Control Transfer requiring a Status TRB before starting transfer

2020-01-13 Thread Benjamin David Lunt
I believe it is required to send an error event. It checked for the STATUS TRB and found that it was missing, therefore it must send an Error Event. This is (not so clearly) stated in the specification and I have quoted this in a previous comment. I took it as: If the controller checks for the

[Bug 1859378] Re: xhci Control Transfer requiring a Status TRB before starting transfer

2020-01-13 Thread Gerd Hoffmann
Well, no. Status TB not being present is an error. The host adapter is not required to check for that error condition though. If the host adapter checks for that error condition it should queue an transfer error. So, yes, we could improve qemu a bit here, by throwing an error instead of

[Bug 1859378] Re: xhci Control Transfer requiring a Status TRB before starting transfer

2020-01-12 Thread Benjamin David Lunt
Just a little more information. In section 4.11.2.2, page 159 of version 1.0 of the xHCI specification, it states: • The xHC shall NOT check for the following Control transfer error conditions. • If a Data Stage TD follows a Setup Stage TD, where wLength = ‘0’. • If a Status Stage TD does

[Bug 1859378] Re: xhci Control Transfer requiring a Status TRB before starting transfer

2020-01-12 Thread Benjamin David Lunt
Removing this check will indeed require a bit of a re-write. The way the code is now, the transfer expects a SETUP packet to be first. If you remove the check I ask about above, will the next transfer show that it is the STATUS packet? If so, then the check at line 1696 will indeed catch and