I never had the opportunity to test my VTPlayer driver on an architecture other than IA-32. As I have just got hands on a SunBlade 100, which now runs Ubuntu Linux, I tried to compile and test the driver. There were no compile error nor crashes, but the driver mysteriously failed when probing the device. As usual, this was caused by an indianness mess: everything in the USB protocol is little-endian, so if you test on little-endian machines only, you are prone to making mistakes like this one:
if ((udev->descriptor.idVendor != VTP_VENDOR_ID) ||
(udev->descriptor.idProduct != VTP_PRODUCT_ID)) { ...
The comparisons depend on the computer’s endianness, which is not portable (although it seems fine on IA-32). One has to use le16_to_cpu
before comparing:
if ((le16_to_cpu(udev->descriptor.idVendor) != VTP_VENDOR_ID) ||
(le16_to_cpu(udev->descriptor.idProduct) != VTP_PRODUCT_ID)) { ...
The latest version of the driver, labelled 0.4.1, now works fine on IA-32 and SPARC architectures, and should be OK on other architectures as well. It is compatible with the latest Linux kernels (2.6.22.9). It is available for download at SourceForge.net.
Valid HTML5? © Christophe Jacquet. ✍ Contact. Imprint (Mentions légales).