Re: usb_sg_init() from completion callback

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

 



On Mon, 6 Jul 2009, Ramya Desai wrote:

> On Mon, Jul 6, 2009 at 11:27 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Mon, 6 Jul 2009, Ramya Desai wrote:
> >
> >> Dear Experts,
> >>
> >> Is there any limitation in calling usb_sg_init() from completion callback?
> >> I am getting the srb structure parameters from URB context.
> >
> > You can call usb_sg_init from a completion callback, provided you pass
> > it the GFP_ATOMIC memory flag.  However you cannot call usb_sg_wait
> > from a completion callback.
> >
> > Alan Stern
> 
> If I schedule a tasklet, can I call usb_sg_wait() from that tasklet ?.

Tasklets run in interrupt context, don't they?  So the answer is No.  
As you can see from the kerneldoc in usb_sg_wait, it has to be called 
in process context.

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