On Fri, 29 Oct 2004, N Lin wrote:

> Thanks, with this patch, now the UHCI driver doesn't lockup with this card. 
> So, I'm happy.
> 
> However, I'm not sure if there is still a lingering problem here. This PCMCIA
> card is a USB2 hub, so I thought I should be able to use both USB2 and USB1
> devices over the hub. But I can only use USB2 hi-speed devices (i.e. my USB2
> hard drive), not USB1 devices (e.g. my webcam), over this hub. My understanding
> of the proper behavior (please correct me if I'm wrong) is that the EHCI driver 
> would handle the USB2 transfers over this card, but if a USB1 device is connected 
> to the hub then the EHCI module will pass the handling on to the companion UHCI 
> driver to do the USB1 stuff.
> 
> Since no USB1 devices work when connected to the hub, it seems that EHCI is
> trying to pass the handling on to UHCI, but UHCI is doing nothing.
> 
> I've appended three diagnostic outputs.
> 
> 1. The boot-time output when the UHCI driver is loaded. It prints a warning.
> 2. The (working) output when I plug a USB1 webcam into my laptop's built-in USB1 hub.
> 3. The (non-working) output when I plug a USB1 webcam into the PCMCIA USB2 hub.
> 
> If there's anything else I can do to help pinpoint the difficulty please let me
> know.
> 
> Thanks again for your help.
> 
> N Lin
> 
> -------- snip 1 -------------------------------------------------------------
> Boot-time output when UHCI driver is loaded, with warning.

[Edited to remove uninteresting messages showing initialization of the two
on-board UHCI controllers]

> PCI: Enabling device 0000:02:00.0 (0000 -> 0001)
> ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 9 (level, low) -> IRQ 9
> uhci_hcd 0000:02:00.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
> uhci_hcd 0000:02:00.0: irq 9, io base 00004000
> uhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
> uhci_hcd 0000:02:00.0: detected 2 ports
> uhci_hcd 0000:02:00.0: USBCMD_HCRESET timed out!
> uhci_hcd 0000:02:00.0: init error -110

Even with a 10-millisecond timeout, this PCMCIA controller failed to
initialize itself.  If you want, you can try editing the patch by hand.  
Change the line that sets the "timeout" variable to 10 and set it to 100
instead.  If the controller can't initialize itself in 100 ms then it 
probably just isn't working.

> uhci_hcd 0000:02:00.0: remove, state 0
> uhci_hcd 0000:02:00.0: roothub graceful disconnect
> usb_disconnect nodev
> Uninitialised timer!
> This is just a warning.  Your computer is OK
> function=0x00000000, data=0x0
>  [<c012954d>] check_timer_failed+0x6d/0x70
>  [<c0129a42>] del_timer_sync+0x22/0xe0
>  [<d0958be4>] usb_disconnect+0x194/0x1a0 [usbcore]
>  [<d098ec57>] uhci_stop+0x17/0xb0 [uhci_hcd]
>  [<d0961a67>] usb_hcd_pci_remove+0xb7/0x1b0 [usbcore]
>  [<d09616e5>] usb_hcd_pci_probe+0x305/0x5d0 [usbcore]
>  [<c0215062>] pci_device_probe_static+0x52/0x70
>  [<c02150bc>] __pci_device_probe+0x3c/0x50
>  [<c02150fc>] pci_device_probe+0x2c/0x50
>  [<c026853f>] bus_match+0x3f/0x70
>  [<c026866c>] driver_attach+0x5c/0xa0
>  [<c0268b92>] bus_add_driver+0x92/0xc0
>  [<c021538e>] pci_register_driver+0x6e/0xa0
>  [<d09040c3>] uhci_hcd_init+0xc3/0x141 [uhci_hcd]
>  [<c013aa80>] sys_init_module+0x130/0x260
>  [<c01062eb>] syscall_call+0x7/0xb

These warning messages are caused by a separate bug in the driver startup.  
I'm working on a different patch which should fix the problem, but for now
just ignore the warnings.

(Technically, if the hcd->start callback fails then hcd->stop should not
be invoked -- but it is.  David, will the EHCI and OHCI drivers work okay
if hcd->stop isn't invoked when hcd->start fails?)

> uhci_hcd 0000:02:00.0: USB bus 3 deregistered
> uhci_hcd: probe of 0000:02:00.0 failed with error -110
> PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
> ACPI: PCI interrupt 0000:02:00.1[B] -> GSI 9 (level, low) -> IRQ 9
> uhci_hcd 0000:02:00.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
> uhci_hcd 0000:02:00.1: irq 9, io base 00004020
> uhci_hcd 0000:02:00.1: new USB bus registered, assigned bus number 3
> uhci_hcd 0000:02:00.1: detected 2 ports
> usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
> usb usb3: default language 0x0409
> usb usb3: Product: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
> usb usb3: Manufacturer: Linux 2.6.8.1 uhci_hcd
> usb usb3: SerialNumber: 0000:02:00.1
> usb usb3: hotplug
> usb usb3: adding 3-0:1.0 (config #1, interface 0)
> usb 3-0:1.0: hotplug
> hub 3-0:1.0: usb_probe_interface
> hub 3-0:1.0: usb_probe_interface - got id
> hub 3-0:1.0: USB hub found
> hub 3-0:1.0: 2 ports detected
> hub 3-0:1.0: standalone hub
> hub 3-0:1.0: no power switching (usb 1.0)
> hub 3-0:1.0: individual port over-current protection
> hub 3-0:1.0: power on to power good time: 2ms
> hub 3-0:1.0: local power source is good
> uhci_hcd 0000:02:00.1: port 1 portsc 008a
> hub 3-0:1.0: port 1, status 0100, change 0003, 12 Mb/s
> hub 3-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
> uhci_hcd 0000:02:00.1: port 2 portsc 008a
> hub 3-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
> hub 3-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100
> uhci_hcd 0000:02:00.1: suspend_hc

This is interesting.  Apparently your PCMCIA card has a second UHCI 
controller, and it works okay.  Yet more evidence indicating the first 
controller is broken!

[snipped logs showing how the webcam works when plugged into an onboard 
UHCI port]

> -------- snip 3 -------------------------------------------------------------
> Non-working hotplugging of a USB1 webcam into PCMCIA USB2 port.
> 
> ehci_hcd 0000:02:00.2: port 1 full speed --> companion
> ehci_hcd 0000:02:00.2: GetStatus port 1 status 003801 POWER OWNER sig=j  CONNECT
> 
> That's it - nothing more, nothing about UHCI... shouldn't UHCI take over 
> at this point?

It should.  But the log messages don't indicate which companion has been 
asked to take over; is it the broken one at 0000:02:00.0 or the working 
one at 0000:02:00.1?

(David, could you add some debugging code to the EHCI driver to print out
the exact mapping from an EHCI port to the companion controller/port
whenever a handoff occurs?)

Since there are two UHCI controllers (each with two ports) on the PCMCIA
card, I would guess that the card has four ports.  If two of them are 
connected to the broken controller and two are connected to the working 
controller, then maybe all you have to do is plug the webcam into one of 
the other ports.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to