Here are fixes for a couple of different big endian problems that showed up on one of 
our MIPS32 board which prevented USB 2.0 from working big endian. Without these 
patches, I don't think USB2.0 could have worked on any big endian architecture, unless 
the length and hci_version were by coincidence the same values after swapping...

The 2nd patch (0x7F mask) has already been fixed in 2.6.0-test8, according to David B.

Basically, these 3 fields are organized little endian in ehci.h, rather than as a u32. 
This caused the version and length fields to be swapped and misinterpreted. The offset 
to the registers became bad, causing seg faults.
        u8              length;         /* CAPLENGTH - size of this struct */
        u8              reserved;       /* offset 0x1 */
        u16             hci_version;    /* HCIVERSION - offset 0x2 */

The other problem is that 
                        if (le32_to_cpu (qh->hw_info1 & 0x7f) == 0)
should be
                        if ((le32_to_cpu (qh->hw_info1) & 0x7f) == 0) 
i.e. the le32_to_cpu conversion must be done on the hw_info1 before the & 0x7f or the 
address in subsequent transactions will be incorrect and the device won't respond 
correctly.

Please let me know if you need anything else. 

(This is my first submission, so I probably messed something up...I'm sure you'll let 
me know?)

Regards,

Darwin Rambo, 
Broadcom Corporation


 <<patch.linux.2.4.23-pre7-usb2.0fixes>> 

Attachment: patch.linux.2.4.23-pre7-usb2.0fixes
Description: patch.linux.2.4.23-pre7-usb2.0fixes

Reply via email to