Re: usb_sg_init() from completion callback

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

 



On Mon, 6 Jul 2009 23:31:22 +0530, Ramya Desai <ramya.desai@xxxxxxxxx> wrote:
> On Mon, Jul 6, 2009 at 11:27 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Mon, 6 Jul 2009, Ramya Desai wrote:

> >> 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.

> If I schedule a tasklet, can I call usb_sg_wait() from that tasklet ?.

No. A tasklet is the same as interrupt, as far as limitations
on sleeping go.

What are you trying to accomplish anyway? I know that you're writing
some kind of another ub or a threadless usb-storage, but what is it for?

-- Pete
--
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