View Full Version : Problem with offset with usb_device_descriptor

20th October 2004, 03:08 PM
I have been working on USB drivers. In the structure usb_device, there is a structure called usb_device_descriptor. In my program, it is getting offset by 4 bytes, so as a result, I am not able to get the right value of idVendor and idProduct. I have seen the hex dump of the structure , I have seen the idVendor and idProduct, and it is offset by 4 bytes.
When the usb device is plugged in, i can see the debug statements of usb.c, where in it reads the right value from the usb_device_descriptor. Well the initial variables of the structure are right, but the problem comes in when the all important usb_device_descriptor comes into picture.
I have seen the packing requirements of the structure and it is right. I cant seem to pinpoint the problem. I kinda figured out that there may be a problem in the way I am compling my file. I would be glad if some one could help me out with this problem.