Is there anything special I need to do to get a control_msg request to work
with a kernel driver, maybe some kind of special initialization before? I have
a working libusb driver and am trying to port it to the kernel. I have been
trying to learn how to write a usb driver by looking at se401.c.

Thanks,

Chris Cheney

KERNEL:

I send a request like this:

 vicam_sndctrl(1, vicam, VICAM_REQ_VENDOR, 0, firmware1, sizeof(firmware1));

and get:

kernel: vicam.c: urb 1
kernel: usb-uhci.c: interrupt, status 28, frame# 555
kernel: usb_control/bulk_msg: timeout

LIBUSB:

i do this:

n=usb_control_msg(st_handle,0x41,0xff,0,0,firmware1,sizeof(firmware1),CTRL_TIMEOUT);

which works just fine.

------

function used from se401.c

static int vicam_sndctrl(int set, struct usb_vicam *vicam, unsigned short req, 
unsigned short value, unsigned char *cp, int size)
{
return usb_control_msg ( vicam->udev, set ? usb_sndctrlpipe(vicam->udev, 0) : 
usb_rcvctrlpipe(vicam->udev, 0), req, (set ? USB_DIR_OUT : USB_DIR_IN) | 
USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, 0, cp, size, HZ);
}

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

Reply via email to