Hi,
 
While I was working on a device controller driver tested with mass storage, I 
got a question regarding on the stall condition.  For mass storage device, the 
driver stalls the bulk-in ep when there is an error processing CBW.  Then the 
host will send clear_feature to clear the halt condition.  However set_halt in 
all udc drivers always checks if the IN ep queue is empty, and returns -EAGAIN 
when the ep queue is not empty. 
 
Here comes the problem:
A problem with CBW is found.  Device stalls bulk-in ep.  Host sends 
clear_feature control transfer.  Gadget layer queues error CSW to the bulk-in 
ep.
At this time, the bulk-in ep is halted, there is a CSW request queued in the 
bulk-in ep, and clear_feature can't be executed as the queue is not empty.  
They form a dead-lock, and stop working.
 
How did we do to avoid such a situation?  Or to break it?
 
 
--
Leo Li
Freescale Semiconductor
 
 
[EMAIL PROTECTED]
 



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to