Richard CHAN Shih-Ping wrote:
Hi David and list,
Hi Richard ... good problem report, we like!  Though I expect
you mean 2.4.21-pre1, not 2.4.20 ...


hcd.c: ehci-hcd @ 00:1d.7, Intel Corp. 82801DB USB EHCI Controller
hcd.c: irq 10, pci mem e0ae7c00
usb.c: new USB bus registered, assigned bus number 4
hcd.c: remove: 00:1d.7, state 0
usb.c: USB bus 4 deregistered

I have tracked the problem to ehci_start() calling ehci_reset() calling handshake():

static int ehci_reset (struct ehci_hcd *ehci)
{
....
....
return handshake (&ehci->regs->command, CMD_RESET, 0, 250);
}

handshake() is always returning non-zero due to ETIMEOUT, I've also tried
increasing 250 to 2000; if I ignore the return code from ehci_reset()
the driver loads.
But does it work afterwards?  It didn't actually reset yet,
which is what the ETIMEDOUT indicates.

The EHCI 1.0 spec says (2.3.1) that bit clears itself when
the reset is done, and the only constraint on it is that
the STS_HALT bit must be set.  Which is guaranteed by the
call to ehci_halt() shortly before.

That 250 is in microseconds, not milliseconds, so maybe
this hardware is just slower to reset than the other EHCI
hardware I've used.  Try using "250 * 1000" instead ... your
"2000" was just two milliseconds, which still isn't much.


PCI: Found IRQ 10 for device 00:1d.7
PCI: Setting latency timer of device 00:1d.7 to 64
hcd.c: ehci-hcd @ 00:1d.7, Intel Corp. 82801DB USB EHCI Controller
hcd.c: irq 10, pci mem e0ae7c00
usb.c: new USB bus registered, assigned bus number 4
ehci-hcd.c: ehci_start called
ehci-hcd.c: enabled 64bit PCI DMA (DAC)
ehci-hcd.c: USB 2.0 support enabled, EHCI rev 1.00, ehci-hcd 2002-Sep-23
hub.c: USB hub found
hub.c: 6 ports detected

If I change the handshake line (copied from the handshake() line in ehci_halt()) to
return handshake (&ehci->regs->command, CMD_RESET, CMD_RESET, 250);

then the driver loads. Since I'm not sure of the meaning of either of these two kludges what do you folks think?
That second approach is clearly wrong, since the chip won't have
initialized correctly.  When it does finish resetting, it's likely
to clobber some of the initialization the driver did.

The first one seems like the right approach to me, if you just use
a longer timeout I'd expect it would work.  If it doesn't, then
more sleuthing will be needed.

- Dave



Cheers
Richard

lspci -v
00:1d.7 USB Controller: Intel Corp. 82801DB USB EHCI Controller (rev 01) (prog-if 20 [EHCI])
Subsystem: Micro-star International Co Ltd: Unknown device 3981
Flags: bus master, medium devsel, latency 0, IRQ 10
Memory at dffffc00 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] #0a [2080]




-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to