On Fri, 27 Apr 2001, Oliver Neukum wrote:
> > the urb structure is having the context pointer as one of the member. in
> > case bluetooth, "bluetooth" is the context pointer being passed while
> > filling the URB.
> > so my question is in whose context is this callback going to run.
> > can any body please clear this doubt.
>
> None or rather a random context.
> The callback is called from hardware interrupt.
> As a consequence you must not schedule or sleep.
> Neither can you access user space.
I think the original poster's question was addressed to urb->context.
If so, the completion handler (AKA callback) is called (in interrupt
context) with struct urb * parameter, i.e. the urb which wants to notify
its completion. Using urb->context one may access whatever object this
references (as set by FILL_*_URB() f.e.).
Typically urb->context points to the driver-private device struct (like
bluetooth) to which the urb belongs.
Martin
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel