Re: Unstable ehci(-platform) when using root hub (hw lockup after port reset problem?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 16 Apr 2016, Rafał Miłecki wrote:

> >> Now, this is pretty interesting. So first of all I'm not using
> >> CONFIG_USB_OHCI_HCD_PLATFORM.
> >
> > Is that because you simply haven't enabled it, or because you don't
> > have any OHCI hardware on your platform?
> 
> I just didn't have it enabled. There is OHCI hardware available. Since
> you mentioned it ofc I decided to give it a try. As I expected I got 2
> root hubs visible this time:
> 1d6b:0002 Linux Foundation 2.0 root hub
> 1d6b:0001 Linux Foundation 1.1 root hub
> 
> First of all, with ohci-platform I can plug in USB 1.1 device, see it,
> unplug it and continue using port. It's a great difference compared to
> the previous report of USB port not being usable anymore (after
> plugging USB 1.1 device).

That's because your system was intended to have both controllers
working.  If only the EHCI controller is operational, it doesn't work
right for USB-1.1 devices.

> Now, there is more interesting stuff. With ohci-platform enabled
> triggering "port 1 full speed --> companion" (by plugging device very
> slowly) doesn't mean USB becoming unusable anymore. I can see may more
> ohci and ehci messages until (as it seems to me) both controllers give
> up. Please take a look at attached ehci-ohci-success-1.txt.

Yes, that's pretty much what it looks like.

By plugging in the connector very slowly, you are causing the signal
pins to make and break their connections several times.  This messes 
up the hardware and the drivers, although they do recover eventually.

> So there is my theory:
> 1) Connecting USB 1.1 device without ohci-platform installed causes
> some port lockup.

Yep.  When the EHCI controller sees that the device only supports
USB-1.1, it hands the port over to the OHCI controller.  Without the
OHCI driver, the OHCI controller never hands the port back -- even
after the device has been unplugged.

> 2) Connecting USB 2.0 very slowly seems to trigger some transmission
> error and makes OHCI hardware trying to handle this device.
> What I was experiencing so far was a mix of both above. I was
> connecting USB 2.0 device slowly (triggering some error) and I got
> OHCI hardware trying to handle it. I didn't have ohci-platform
> installed and it resulted in port lockup.
> 
> Does it make any sense?

Yes, that's what you should expect.  There's a simple lesson to learn: 
Don't insert the connectors very slowly!  :-)

> I'm also wondering if there is any way to avoid port lockups caused by
> connecting USB 1.1 device without ohci-platform installed?

No.  Or rather, the only way to avoid it is if you don't install 
ehci-platform either.  But that's not much use, because then you 
wouldn't have any USB support at all!

> > I get the impression that this behavior is intended, and your board was
> > never meant to be used without an external hub.  Or possibly with some
> > other permanently attached USB-2 device.  Either way, none of these
> > problems would occur, right?
> 
> This sounds pretty unexpected. I can't imagine vendor telling users to
> don't hot-plug USB device in the user manual.

My initial impression was wrong.  I didn't realize that you had simply 
left out the OHCI driver.

> I also tried installing original firmware on my Netgear R6250 (it's
> based on 2.6.36.4) and after few tries I managed to get some errors,
> but after all I never got port lockup. Sounds like a similar case to
> what I'm seeing with OpenWrt (some recent kernel) and both:
> ehci-platform and ohci-platform.

Yes.  With the same combination of drivers, you get the same behavior.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux