Hi,

i'd like to ask for some clarification on the correct memory allocation to use for calls to usb_control_msg, and its' affiliates. usb_control_msg eventually calls usb_fill_control_urb and assigns whatever memory was passed to it directly to the transfer_buffer. Now according to the USB Guide, http://usb.cs.tum.edu/usbdoc/node23.html, memory for the transfer_buffer for a urb should always be allocated GFP_KERNEL.

Working on the Bitsy (strongarm) with one of the usb camera drivers, i found a number of calls to usb_control_msg that used local memory, and eliminating these seem to fix a set of random hangs. However the same driver has been working just fine on my workstation (x86), worked with very occasional hangs at 2.4.9 on the bitsy, so it's conceivable that this has just moved the bug back into lurking state.

Dipping into the 2.5.59 code, i found a number of instances of calls using kmalloc GFP_KERNEL memory, and a number that didn't, some of these latter buried a little further down the call tree. For example, if you look at hub.c /usb_reset_device(), it passes local memory (descriptor), to usb_get_descriptor which then passes it down to usb_control_msg.

So could somebody perhaps confirm or deny that this is a problem? Since if it is, it's a fairly widespread one.

thanks,

...Jacky



-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to