#10867: EHCI Control Transfers : Hang if length of buffer > size of input data ---------------------------+---------------------------- Reporter: akshay1994 | Owner: phoudoin Type: bug | Status: assigned Priority: normal | Milestone: R1 Component: Drivers/USB | Version: R1/Development Resolution: | Keywords: USB EHCI Blocked By: | Blocking: Has a Patch: 1 | Platform: All ---------------------------+---------------------------- Comment (by akshay1994): Thanks a lot for the response. Yes. You are right. Even on a short packet transaction, the HC does set the active bit to 0. (EHCI Spec, Pg 83, Point 4) (I read the specification wrong, taking a zero length transfer by Host Controller, to be a Short Packet transfer. Sorry!!) Okay, so why does this still anyway fail. Upon encountering a Short Packet, the HC goes to the Alternate_Next_qTD, which is set to a stray descriptor. This has its active bit set to zero, making the HC take a horizontal jump to the next QueueHead, completing this transaction. Now while processing this in FinishTransfers thread, after checking the short packet qTD, we go to the next qTD, which was never processed by the HC, and thus has its Active Bit set. Solution I propose : 1) Instead of setting Alternate_Next_qTD to the stray descriptor, we set it to the status descriptor (for all the data descriptors), completing the requirement of a status stage after every control request, and also generating the required interrupt. 2) Upon encountering a short packet descriptor, while processing, we skip all descriptors following this, till we reach the status descriptor, which was next processed by the HC. Please review this solution, while I make a patch for this. Thanks :) -- Ticket URL: <https://dev.haiku-os.org/ticket/10867#comment:8> Haiku <https://dev.haiku-os.org> Haiku - the operating system.