Hi,

Here's an updated version of the EHCI driver I posted a while back
(0221) ... this one enumerates!  At least for one usb 2.0 device. The
usb 1.1 devices still get handed off to the companion OHCI.

The patch should apply against 2.4.2-ac11 (which has a couple of
key hub patches), but it's actually right out of my development tree.

I've been running with kdb and the spinlock debugging code, which
helped catch a couple of problems nice and quickly!  You may need
to tweak mm/slab.c (don't use CONFIG_SLAB_DEBUG) and/or
disable the SLAB_POISON flag.  Nothing's hung for quite a while,
but testing on real SMP hardware should of course be done.  (And
I just tweaked handling of one lock; surely something will break!)
No known oopses, either.

I'm hoping that this version will be a good basis for other folks
to debug and develop against.  Additions like support for interrupts,
scheduling, iso, split transactions, and so on!  And I'm sure there
are patches needed in the basic control/bulk code, which will be
turning up now that enumeration behaves.  Now device drivers can
really start abusing this host driver.

For your information, I append "lspci" and "/proc/bus/usb/devices"
output.  I'll post a couple related patches in a bit, too.

- Dave

I got access (thanks!) to an EHCI controller based on the NEC chip.
"lspci -v -s 00:10" tells me this (with pci-ids.patch):

00:10.0 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])
 Subsystem: NEC Corporation USB
 Flags: bus master, medium devsel, latency 40, IRQ 11
 Memory at fedff000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: [40] Power Management version 2

00:10.1 USB Controller: NEC Corporation USB (rev 41) (prog-if 10 [OHCI])
 Subsystem: NEC Corporation USB
 Flags: bus master, medium devsel, latency 40, IRQ 10
 Memory at fedfe000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: [40] Power Management version 2

00:10.2 USB Controller: NEC Corporation USB 2.0 (rev 01) (prog-if 20 [EHCI])
 Subsystem: NEC Corporation USB 2.0 Host
 Flags: bus master, medium devsel, latency 32, IRQ 9
 Memory at fedfdc00 (32-bit, non-prefetchable) [size=256]
 Capabilities: [40] Power Management version 2

The two "companion" OHCI controllers handle the USB 1.1 devices for the root
hub (without a "Transaction Translator"), and work fine using "usb-ohci".

A given root hub port is either going to switch to the EHCI controller, or
to one of the companions:  five ports shared among three controllers.  The
EHCI driver only handles high speed devices.  For example:

EHCI root hub (Spd=480/high, Ver=2.0, cls 9/0/1).

    T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 5
    B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
    D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
    P:  Vendor=0000 ProdID=0000 Rev= 2.40
    S:  Product=USB ehci-hcd Root Hub
    S:  SerialNumber=cc830c00
    C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
    E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl= 12ms

USB storage device (prototype).  Bulk maxpacket = 512 bytes!!

    T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=05ab ProdID=0060 Rev= 1.00
    S:  Manufacturer=In-System Design
    S:  Product=USB Storage Adapter
    C:* #Ifs= 1 Cfg#= 2 Atr=c0 MxPwr= 98mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=  1ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=  1ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=  9ms

I've not actually tried to use usb-storage through this hcd yet, but
it worked through usb-ohci (at usb 1.1 speeds) so I expect it won't
be too troublesome.

480 Mbit/sec = 60 MByte/sec ... compare to ATA/66 ...



ehci-0305.patch.bz2

Reply via email to