URBs active during clear endpoint halt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

Do you know if there's a chance that any USB drivers (or userspace)
would try to clear an endpoint halt when there are active URBs that have
not completed on for the endpoint?

I ask because in order to handle the case where userspace wants to reset
the toggles with a clear halt control transfer, but the endpoint is not
actually halted, the xHCI driver needs to wipe out the contents of the
endpoint ring and reset the dequeue pointer.  (The dequeue pointer
alignment for the Configure Endpoint command forces us to set the
pointer the top of the ring, or every fourth TRB.)  Re-initializing the
ring would be bad to do if there were pending URBs that hadn't been
canceled before the driver tried to clear the halt.

I think it's pretty unlikely for this corner case to occur, but I could
potentially see a driver queueing multiple URBs to an endpoint, and
clearing the halt that occurred on the first URB, and then expecting the
other URB to complete successfully.  What would happen under EHCI in
this case?

Would it be OK to simply return the second URB with a -EPROTO in this
case?  Or should we save the URBs, re-init the endpoint ring, requeue the
URB to the ring, and ring the endpoint doorbell?

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux