Re: [Q] USB urb completion handler

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

 



hi:

2012/5/23 Ezequiel Garcia <elezegarcia@xxxxxxxxx>:
> Hi,
>
>>> Bingo! Because the driver will only submit *one* urb at a time,
>>> how could it possible have more than one completion handlers
>>> called at a time?
>>
>> how about multi-thread try to send urbs on the same pipe with the same
>> complete function?
>
> Actually, I was wrong because my driver (being a video capture driver)
> submits several
> isoc urbs at the same time.
>
> I'm still not sure how this works regarding concurrency, but I guess
> (or hope) the usb core calls
> the completion handler one at a time OR the device sends interrupts
> one at a time for each urb.
take multi-core system for example, it is possible your completion
handler execute at the same time, except you add a spin lock for
activating your completion function.


>
> I know it's a terrible thing for me to guess (or hope), but these days
> I've been testing
> the driver under several conditions and it seems to work fine.
> So I'm not worrying too much.
>
> If someone more knowledgeable reads this and can put a light upon this issue,
> I would appreciate it.
>
> loody: Thanks for your answer regarding context ;)
> Ezequiel.



-- 
Regards,

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux