Re: usb_sg_init() from completion callback

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

 



On Tue, 7 Jul 2009, Ramya Desai wrote:

> I wanted my driver to make asynchronous calls to the device (USB
> attached SCSI). To get this I am issuing commands from callback
> context. Is there any alternate call to usb_sg_wait(), that can be
> called from callback context.

There are alternatives, but none of them are able to handle 
scatter-gather lists.

>  If there is no alternate call, do I need
> to change my driver design?

It's kind of hard to answer this without knowing what your driver 
design is.

> Because if the driver is blocked waiting on the scatter gather
> transfer by calling usb_sg_wait() from driver context, it can't queue
> any other command. Will this lead to spawn a kernel thread or a work
> queue or something, so that each instance can call usb_sg_init() and
> usb_sg_wait()?

That would be one possible approach.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux