Subbrathnam, Swaminathan wrote:

If EP is busy, we have even less reason to do a giveback. This is not a real fix, just pallialtive. Actually, whether a STALL token has been sent or not shouldn't play any role in giving back URB, so the fragment being pacthed is just totally wrong. Other drivers just don't allow EP that is still active to be halted, and this driver should do the same.

Your comment is plain wrong. I think there are scenarios that would require requests to be given back during stall handling. I am laying one out below for

        4. On completion of the STALL (on SENTSTALL interrupt) driver would 
need to abort the current transfer and return the USB request with appropriate 
status.  Here the EP state is busy handling the in-flight IO and the request 
that is active has to be returned/givenback.

Don't know how I missed this hilarity. This passage made me wonder whether you've really taken time to look when ep->busy gets set. Do it please, you'll be surprised. :-)

WBR, Sergei

PS: busy flag is only set in musb_g_giveback() and nuke(), so it certainly does *not* mean "I/O in progress".

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to