Commit 9beeee6584b9aa4f ("USB: EHCI: log a warning if ehci-hcd is not loaded first") said that ehci-hcd should be loaded before ohci-hcd and uhci-hcd. However, commit 05c92da0c52494ca ("usb: ohci/uhci - add soft dependencies on ehci_pci") only makes ohci-pci/uhci-pci depend on ehci- pci, which is not enough and we may still see the warnings in boot log. So fix it by also making ohci-hcd/uhci-hcd depend on ehci-hcd.
Cc: stable@vger.kernel.org Reported-by: Shengwen Xiao atzlinux@sina.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn --- drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/uhci-hcd.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 9c7f3008646e..549c965b7fbe 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1355,4 +1355,5 @@ static void __exit ohci_hcd_mod_exit(void) clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); } module_exit(ohci_hcd_mod_exit); +MODULE_SOFTDEP("pre: ehci_hcd");
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 14e6dfef16c6..e1a27d01bdbc 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -939,3 +939,4 @@ module_exit(uhci_hcd_cleanup); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: ehci_hcd");
On Tue, Dec 30, 2025 at 04:00:14PM +0800, Huacai Chen wrote:
Commit 9beeee6584b9aa4f ("USB: EHCI: log a warning if ehci-hcd is not loaded first") said that ehci-hcd should be loaded before ohci-hcd and uhci-hcd. However, commit 05c92da0c52494ca ("usb: ohci/uhci - add soft dependencies on ehci_pci") only makes ohci-pci/uhci-pci depend on ehci- pci, which is not enough and we may still see the warnings in boot log. So fix it by also making ohci-hcd/uhci-hcd depend on ehci-hcd.
Cc: stable@vger.kernel.org Reported-by: Shengwen Xiao atzlinux@sina.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn
drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/uhci-hcd.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 9c7f3008646e..549c965b7fbe 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1355,4 +1355,5 @@ static void __exit ohci_hcd_mod_exit(void) clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); } module_exit(ohci_hcd_mod_exit); +MODULE_SOFTDEP("pre: ehci_hcd");
Ick, no, this way lies madness. I hate the "softdep" stuff, it's usually a sign that something is wrong elsewhere.
And don't add this _just_ to fix a warning message in a boot log, if you don't like that message, then build the module into your kernel, right?
And I really should just go revert 05c92da0c524 ("usb: ohci/uhci - add soft dependencies on ehci_pci") as well, that feels wrong too.
thanks,
greg k-h
Hi,
在 2025/12/30 16:15, Greg Kroah-Hartman 写道:
On Tue, Dec 30, 2025 at 04:00:14PM +0800, Huacai Chen wrote:
Commit 9beeee6584b9aa4f ("USB: EHCI: log a warning if ehci-hcd is not loaded first") said that ehci-hcd should be loaded before ohci-hcd and uhci-hcd. However, commit 05c92da0c52494ca ("usb: ohci/uhci - add soft dependencies on ehci_pci") only makes ohci-pci/uhci-pci depend on ehci- pci, which is not enough and we may still see the warnings in boot log. So fix it by also making ohci-hcd/uhci-hcd depend on ehci-hcd.
Cc: stable@vger.kernel.org Reported-by: Shengwen Xiao atzlinux@sina.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn
drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/uhci-hcd.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 9c7f3008646e..549c965b7fbe 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1355,4 +1355,5 @@ static void __exit ohci_hcd_mod_exit(void) clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); } module_exit(ohci_hcd_mod_exit); +MODULE_SOFTDEP("pre: ehci_hcd");
Ick, no, this way lies madness. I hate the "softdep" stuff, it's usually a sign that something is wrong elsewhere.
And don't add this _just_ to fix a warning message in a boot log, if you don't like that message, then build the module into your kernel, right?
In Debian kernel config, the USB driver module is config as module.
I meet this warning info in my Loongarch machine 3A6000 on Debian:
[ 1.119467] Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
I hope this warning can fix in my Loongarch machine.
And I really should just go revert 05c92da0c524 ("usb: ohci/uhci - add soft dependencies on ehci_pci") as well, that feels wrong too.
thanks,
greg k-h
Is there more better way to fix this Warning info?
BTW: I'm not a kernel developer, just a Loongarch linux user.
thanks,
On Tue Dec 30, 2025 at 9:15 AM CET, Greg Kroah-Hartman wrote:
On Tue, Dec 30, 2025 at 04:00:14PM +0800, Huacai Chen wrote:
Commit 9beeee6584b9aa4f ("USB: EHCI: log a warning if ehci-hcd is not loaded first") said that ehci-hcd should be loaded before ohci-hcd and uhci-hcd. However, commit 05c92da0c52494ca ("usb: ohci/uhci - add soft dependencies on ehci_pci") only makes ohci-pci/uhci-pci depend on ehci- pci, which is not enough and we may still see the warnings in boot log. So fix it by also making ohci-hcd/uhci-hcd depend on ehci-hcd.
Cc: stable@vger.kernel.org Reported-by: Shengwen Xiao atzlinux@sina.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn
drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/uhci-hcd.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 9c7f3008646e..549c965b7fbe 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1355,4 +1355,5 @@ static void __exit ohci_hcd_mod_exit(void) clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); } module_exit(ohci_hcd_mod_exit); +MODULE_SOFTDEP("pre: ehci_hcd");
Ick, no, this way lies madness. I hate the "softdep" stuff, it's usually a sign that something is wrong elsewhere.
And don't add this _just_ to fix a warning message in a boot log, if you don't like that message, then build the module into your kernel, right?
And I really should just go revert 05c92da0c524 ("usb: ohci/uhci - add soft dependencies on ehci_pci") as well, that feels wrong too.
FWIW, I've been seeing this warning on several of my Rockchip based devices as well. I thought I had already mentioned that on some ML, but couldn't find it on lore.k.o ... turns out I reported it on my 'own' ML: https://lists.sr.ht/~diederik/pine64-discuss/%3CDD65LB64HB7K.15ZYRTB98X8G2@c... (and likely on #linux-rockchip IRC channel)
Most of it is just my research notes, but the last post also had this:
``` I checked the last 20 boots on my devices to see that warning (or not). Device Number of times that warning showed up Rock64 (rk3328) 16x RockPro64 (rk3399) 11x Quartz64 Model A (rk3566) 7x Quartz64 Model B (rk3566) 14x PineTab2 (rk3566) 17x NanoPi R5S (rk3568) 13x Rock 5B (rk3588) 12x ```
While I generally don't like seeing warning messages, it often also resulted in USB2 ports not working. Maybe even every time, but I only notice it when I actually tried to use one of the USB2 ports.
The first post mentioned what I 'assume' to be the problem: ``` CONFIG_USB_XHCI_HCD=m CONFIG_USB_EHCI_HCD=m CONFIG_USB_OHCI_HCD=m ```
So I guess USB_EHCI_HCD doesn't work with '=m'.
Cheers, Diederik
linux-stable-mirror@lists.linaro.org