lkml.org 
[lkml]   [2004]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectvid&pid problems in usb_probe()


I am writting an usb driver.You know function usb_probe(...) is used to determine whether the usbdevices just pluged in is what the driver is for.

The Vid and Pid of my usb device are 0x1111 and 0x0000 respectively.

the program is :

static void* usb_probe(struct usb_device *udev, unsigned int ifnum, const struct usb_device_id *id)
{
..............
..............

printk("<1>Vid:%x\nPid:%x\n",udev->descriptor.idVendor,udev->descriptor.idProduct);

if ((udev->descriptor.idVendor!=0x1111)
||(udev->descriptor.idProduct!=0x0000)) return NULL;

..............
}

when I plug the device whose vid & pid is 0x1111 & 0x0000 respectively.
this Module displayed


Vid:0
Pid:201

usb.c ........ no active driver for this device;

and when I plug another device , I also got wrong vid & pid.

But when I wrote program as below:

__u16 tmp=0x1111;
printk("<1>%x",tmp);

it can print "1111" on the screen. That means my syntax is correct.
I mean, the problem may be at the data transfered into function usb_probe()
Maybe data transfered into function usb_probe() is wrong.

I wonder where is the problem, how can i solve.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.044 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site