I apologize.  
I've recently started using gpg and didn't realize it would mangle patches.

========= Problem symptom

A problem was seen when a high speed hub was plugged into a port of a high
speed controller attached to a MIPS-4km processor running uClinux upgraded
to Linux 2.4.26 plus local mods.  The high speed hub was seen, but no
interrupts were received from the high speed hub when devices were
connected to the high speed hub causing those devices to not be detected.

Polling the high speed hub showed the high speed hub was otherwise
functional because devices connected to the high speed hub were then
detected.

========== Problem analysis
Under certain conditions, a line of code in routine qh_schedule()
found in the file linux/drivers/usb/host/ehci-sched.c is executed which
attempts to clear the S-frame and C-frame masks in the Queue Head 
structure
without taking into account qh->hw_info2 is in little endian format.

This causes the fields, High-Bandwidth Pipe Multipler, Port Number, and
Hub Addr fields to be cleared on a big endian processor.

"Enhanced Host Controller Interface Specification for Universal Serial 
Bus"
from Intel Corporation, Revision 1.0, in Table 3-20,
indicates a High-Bandwidth Pipe Multiplier of 00b is reserved.
A zero in this field yields undefined results.

========== Suggested patch

The following patch is suggested for Linux 2.4.26.
This patch has been tested on a MIPS-4km processor running uClinux plus
local mods.
                                                                                
===== BEGIN PATCH FOR Linux 2.4.26 =====
diff -Naur linux-2.4.26/drivers/usb/host/ehci-sched.c 
linux-2.4.26-custom/drivers/usb/host/ehci-sched.c
--- linux-2.4.26/drivers/usb/host/ehci-sched.c  2004-04-14 08:05:33.000000000 -0500
+++ linux-2.4.26-custom/drivers/usb/host/ehci-sched.c   2004-05-30 09:35:58.000000000 
-0500
@@ -402,7 +402,7 @@
                qh->start = frame;
 
                /* reset S-frame and (maybe) C-frame masks */
-               qh->hw_info2 &= ~0xffff;
+               qh->hw_info2 &= cpu_to_le32 (~0xffff);
                qh->hw_info2 |= cpu_to_le32 (1 << uframe) | c_mask;
        } else
                dbg ("reused previous qh %p schedule", qh);
===== END PATCH FOR Linux 2.4.26 =====

-- 
Rick Sewill                      Phone/FAX: +1-218-287-1075
E-mail: [EMAIL PROTECTED]    Cell Phone: +1-701-866-0266


On Tue, 1 Jun 2004, David Brownell wrote:

> This patch looks fine for me, both 2.4 and 2.6 versions, but
> could you post patches that will apply as-is?  These got
> mangled, and won't apply.
> 
> Preferably with 2.4 and 2.6 ones in separate messages, so
> I can just sign off on them (assuming that's needed!) for
> merges into each kernel.
> 
> - Dave




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to