I have linux-2.4.2 installed. When i load my driver
and plug in a USB mouse to see if the probe function
is called. Instead i get an error:-
usb_control/bulk_msg:Timeout
usb_control/bulk_msg:Timeout
The probe function of my driver isn't being called.
The code of the probe function is as below:-
static void *sample_probe(struct usb_device* udev,
unsigned int ifnum,const struct usb_device_id*
id_table)
{
struct usb_interface *iface;
struct usb_interface_descriptor *interface;
struct usb_endpoint_descriptor *endpoint;
int pipe,maxp;
iface =
&udev->actconfig->interface[ifnum];
interface =
&iface->altsetting[iface->act_altsetting];
if(interface->bNumEndpoints !=1)
return NULL;
endpoint = interface->endpoint+0;
if(!(endpoint->bEndpointAddress & 0x80))
return NULL;
if((endpoint->bmAttributes & 3) !=3)
return NULL;
usb_set_protocol(udev,interface->bInterfaceNumber,0);
usb_set_idle(udev,interface->bInterfaceNumber,0,0);
sample = kmalloc(sizeof(struct
sample_device),GFP_KERNEL);
if(!sample)
return NULL;
memset(sample,0,sizeof(*sample));
pipe =
usb_rcvintpipe(udev,endpoint->bEndpointAddress);
maxp =
usb_maxpacket(udev,pipe,usb_pipeout(pipe));
if(maxp>8)
maxp = 8;
sample->maxp = maxp;
FILL_INT_URB(&sample->myurb,udev,pipe,sample->data,maxp,sample_irq,sample,endpoint->bInterval);
if(usb_submit_urb(&sample->myurb))
{
kfree(sample);
return NULL;
}
printk(KERN_INFO"\nURB submitted \n");
return sample;
}
Thanking you in advance.
Kashif!
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel