Hello.

Subbrathnam, Swaminathan wrote:

   I'm not seeing why we would need to abort an in-flight request.
Moreover, I'm not seeing a conection between the EP busy state and an
URB giveback. What your patch does is just avoiding a race between the
EP halt and queueing URB afterwards -- with the gadget not intending to
abort that URB but which gets aborted. This for example happens when the
file-backed storage gadget sends short data in response to the MODE
SENSE command and the necessairily halts the endpoint, then queues the
CSW but the MUSB gadget driver would prematurely giveback that URB afetr
having sent STALL. This results in host's failure to get any CSW and USB
reset finally ensues...
   And now please tell me how can the driver differ the URB that you
want to abort from one that you must not abort?
    And also tell me how you fix helps the driver to abort in-flight
requests
when you specifically disallow it to do so.


<SWAMI> Pl. refer to the SENT Stall handling for further information.  This is 
the code that has been in the community for a very long time now.

BTW, this code was bitrotting outside kernel.org for a very long time, you should've said. I keep finding unnoticed bugs in it like every 3-4 days.

The patch just adds check for busy status before returning the IO.

You haven't been able to give the correct reasoning for this check so far. Actually, I'm sure that with your change musb_g_giveback() will just never be called from there anymore, so the whole call could be safely deleted.

WBR, Sergei



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

Reply via email to