Menu

#22 endian issues in usb code

open
nobody
None
5
2008-09-03
2008-09-03
No

There are endian issues that prevent the module from working on ppc (and possibly other) architectures. This happens because the endian-sensitive idVendor and idProduct fields of the usb_device_descriptor structure are interpreted directly (see for example the GET_VENDORID and GET_PRODUCTID macros in quickcam.h) and thus usb vendor and product id's are all scrambled on non-x86 machines. This prevents the driver from correctly understanding what camera model it is driving (in my case, the IS_850 macro returns 0 while it should return 1). The correct way of using these fields is to first pass them through le16_to_cpu(). Take a look at other webcam drivers like pwc for examples.

Discussion


Log in to post a comment.