Re: [PATCH 1/2] usb: gadget: udc: core: update usb_ep_queue() documentation

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

 



Hi,

Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:
>> I agree with Alan that the spinlock must be dropped before calling
>> usb_ep_queue. An example can be found in the ep0_queue function of
>> the f_mass_storage driver.
>
> Thanks for the note of support, but you must be looking at a different 
> version of the f_mass_storage code than I am -- in my copy, ep0_queue 
> does not acquire or release any locks.
>
> I forgot to mention in my earlier email...  Felipe said that the 
> problem case involved calling the completion handler for a failed 
> submission.  That definitely is not the right approach; if a submission 
> fails then usb_ep_queue() should return an error code and the 
> completion routine should not be called.
>
> In fact, there is a general principal here which should be documented
> but doesn't seem to be (as far as I can tell).  Namely, a request's
> completion routine will be called if and only if usb_ep_queue() returns
> 0.  That would make a good addition to the kerneldoc for 
> usb_ep_queue().

agreed. Do you want to send a patch or should I write it?

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux