usb_control_msg question

"Gabriel Maganis" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hello,
   I am trying to send commands to a keyboard to set the idle rate and
confirm that it's been set like below,
   #define SET_IDLE 0x0A
   #define GET_IDLE 0x02

   unsigned char data[1] = {0};

   ret = usb_control_msg(dev,
            usb_rcvctrlpipe(dev, 0),
            SET_IDLE,
            (0x01 << 5) + 0x01,
            0xaa00, 0, data, 0, USB_CTRL_SET_TIMEOUT);

    ret = usb_control_msg(dev,
            usb_rcvctrlpipe(dev, 0),
            GET_IDLE,
            (0x01 << 7) + (0x01 << 5) + 0x01,
            0x0000, 0, data, 1, USB_CTRL_GET_TIMEOUT);

    printk("%02x\n", data[0]);

The printk always gives me a zero but the value of ret for GET_IDLE is
always 1. I've been able to do all of this using libusb in user space
but have no success within a kernel module. I've also looked at
devio.c for reference and have run out of ideas of what could be
wrong. Also, when I try to do a SET_REPORT using usb_control_msg in
the kernel just like with libusb, my host controller shuts down and
breaks like I sent _it_ the command.

Thanks..

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.