[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <561129d8-67ff-406c-afe8-73430484bd96@rowland.harvard.edu>
Date: Sat, 3 Jan 2026 11:41:32 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: Diederik de Haas <diederik@...ow-tech.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Huacai Chen <chenhuacai@...ngson.cn>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Shengwen Xiao <atzlinux@...a.com>,
linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH] USB: OHCI/UHCI: Add soft dependencies on ehci_hcd
On Sat, Jan 03, 2026 at 11:57:47AM +0800, Huacai Chen wrote:
> On Sat, Jan 3, 2026 at 11:33 AM Alan Stern <stern@...land.harvard.edu> wrote:
> > Since these systems don't use PCI, the question I raised earlier still
> > needs to be answered: How do they route connections between the ports
> > and the two controllers?
> >
> > There may be some exceptions, but for the most part, the code in
> > ehci-hcd was written assuming that only PCI-based controllers will have
> > companions. If you want to make an exception for loongson-2k0500, you
> > will need to figure out how to get it to work.
> Loongson-2K0500 use EHCI/OHCI with platform bus, while
> Loongson-2K1000/2000 use EHCI/OHCI with PCI bus. They use the same USB
> IP cores, so the route connections are probably the same.
With PCI we know exactly which companion controller each port is
connected to. Is that true in your situation?
Or do you have only one companion controller?
For that matter, how many USB ports do these systems have? Are some of
them USB-1 only or USB-2 only?
> > Have you tested any of those systems to see how they behave if a USB-1
> > device is already plugged in and running when the ehci-hcd driver gets
> > loaded?
You did not answer this question.
There are other issues involving companion controllers, connected with
hibernation. You should take a look at commit 6d19c009cc78 ("USB:
implement non-tree resume ordering constraints for PCI host
controllers"), which was later modified by commit 05768918b9a1 ("USB:
improve port transitions when EHCI starts up") and a few others.
Also, read through the current code in hcd-pci.c (for_each_companion(),
ehci_pre_add(), ehci_post_add(), non_ehci_add(), ehci_remove(), and
ehci_wait_for_companions()). Your non-PCI system will need to implement
some sort of equivalent to all these things.
Alan Stern
Powered by blists - more mailing lists