On Tue, Mar 12, 2002 at 06:39:52PM +0530, V Ganesh wrote:
> I'm halfway through. this is the approach I'm using, please comment:
> 1. all *_callback() functions must use GFP_ATOMIC.

Good.

> 2. anything inside a spinlock must use GFP_ATOMIC.

No, we should not be calling usb_submit_urb() with a spinlock held.
Which usb-serial driver is doing this?

> 3. *_open(), *_startup(), *_set_termios() use GFP_KERNEL.

Good.

> 4. *_write(), *_unthrottle() can be called from user context as well as
>    bottom half context. so I define a macro in usb-serial.h
>       #define ALLOC_FLAGS     (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL)
>    and use it in these functions. the alternative is to always do a
>    GFP_ATOMIC.

What would cause it to be called from a bottom half?  The pppd driver?
For some reason I thought this had been changed.

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to