usb_control_msg data inside module
If I have a code with a USB ctrl message data inside a module
static unsigned char* reset = "\xFF\x00\xEE";
and use that directly in usb_control_msg()
I can't get any results (if I read usbmon correctly it never gets sent).
But if I change the code to allocate the same data
at runtime using kmemdup() and pass that buffer to usb_control_msg()
everything seems to be working.
Why the static data inside the kernel module can't be used directly?
There is no mention about this in any usb_contorl_msg()
documentation I can find.
kernel version 2.6.38 (ubuntu 10.4)