All of lore.kernel.org
 help / color / mirror / Atom feed
* Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
@ 2008-11-21 14:54 Toralf Förster
  2008-11-21 16:25 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Toralf Förster @ 2008-11-21 14:54 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

Hello
WIth  2.6.28-rc6-00007-ged31348 I get that warning message within dmesg udner 
a stable Gentoo system with udev-124. With the current kernel I'm using 
(2.6.26.8) however there isn't such a warning.

-- 
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
@ 2008-11-21 16:25 ` Greg KH
  2008-11-21 16:25 ` Bryan Kadzban
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2008-11-21 16:25 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Nov 21, 2008 at 03:54:15PM +0100, Toralf Förster wrote:
> Hello
> WIth  2.6.28-rc6-00007-ged31348 I get that warning message within dmesg udner 
> a stable Gentoo system with udev-124. With the current kernel I'm using 
> (2.6.26.8) however there isn't such a warning.

That's because that warning was added recently to the kernel.  Change
your module loading order rules and you should be fine.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
  2008-11-21 16:25 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
@ 2008-11-21 16:25 ` Bryan Kadzban
  2008-11-21 16:47 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bryan Kadzban @ 2008-11-21 16:25 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Toralf Förster wrote:
> Hello WIth  2.6.28-rc6-00007-ged31348 I get that warning message
> within dmesg udner a stable Gentoo system with udev-124. With the
> current kernel I'm using (2.6.26.8) however there isn't such a
> warning.

I don't see a question, but I'm assuming it's "what do I need to do to
prevent this warning?", right?  :-)

The answer is "modprobe ehci_hcd before [ou]hci_hcd".  This warning is
due to kernel commit c78487b1d935d938014ddbec7b3d5816c1580fce (in
2.6.27.3; it's commit 9beeee6584b9aa4f9192055512411484a2a624df in
mainline) if that helps.

The comment on that commit says "maybe this will convince anyone still
doing it wrong", though I can't imagine how on earth you're supposed to
do it right.  It's not like you can control which order udev runs
modprobes in.  Any solution that depends on an install command in
modprobe.conf for ehci-hcd (and blacklisting both [uo]hci-hcd) will fail
on some hardware, or load unnecessary drivers.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
  2008-11-21 16:25 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
  2008-11-21 16:25 ` Bryan Kadzban
@ 2008-11-21 16:47 ` Toralf Förster
  2008-11-21 17:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Toralf Förster @ 2008-11-21 16:47 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

At Friday 21 November 2008 17:25:43 Bryan Kadzban wrote :
> Toralf Förster wrote:
> > Hello WIth  2.6.28-rc6-00007-ged31348 I get that warning message
> > within dmesg udner a stable Gentoo system with udev-124. With the
> > current kernel I'm using (2.6.26.8) however there isn't such a
> > warning.
>
> I don't see a question, but I'm assuming it's "what do I need to do to
> prevent this warning?", right?  :-)
>
Oh, you're right - sry I forgot the question .... :-)

And yes, I'm wondering whether a new udev version has to respect this thing or 
what the "typical" linux user should do to prevent this warning.

-- 
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (2 preceding siblings ...)
  2008-11-21 16:47 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
@ 2008-11-21 17:35 ` Greg KH
  2008-11-22  2:46 ` Bryan Kadzban
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2008-11-21 17:35 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Nov 21, 2008 at 05:47:23PM +0100, Toralf Förster wrote:
> At Friday 21 November 2008 17:25:43 Bryan Kadzban wrote :
> > Toralf Förster wrote:
> > > Hello WIth  2.6.28-rc6-00007-ged31348 I get that warning message
> > > within dmesg udner a stable Gentoo system with udev-124. With the
> > > current kernel I'm using (2.6.26.8) however there isn't such a
> > > warning.
> >
> > I don't see a question, but I'm assuming it's "what do I need to do to
> > prevent this warning?", right?  :-)
> >
> Oh, you're right - sry I forgot the question .... :-)
> 
> And yes, I'm wondering whether a new udev version has to respect this thing or 
> what the "typical" linux user should do to prevent this warning.

Add one line to your modprobe.conf file:
	install uhci-hci /sbin/modprobe ehci-hcd

should be all that is needed.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (3 preceding siblings ...)
  2008-11-21 17:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
@ 2008-11-22  2:46 ` Bryan Kadzban
  2010-02-22  6:42 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bryan Kadzban @ 2008-11-22  2:46 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Greg KH wrote:
> On Fri, Nov 21, 2008 at 05:47:23PM +0100, Toralf Förster wrote:
>> And yes, I'm wondering whether a new udev version has to respect this thing or 
>> what the "typical" linux user should do to prevent this warning.
> 
> Add one line to your modprobe.conf file:
> 	install uhci-hci /sbin/modprobe ehci-hcd

Hmm.  I doubt that will work with my ohci-hcd controller.  It also won't
work with USB-1.1-only devices, since uhci-hcd will never load.  :-P

But, it's easy enough to fix; this would be the generic-hardware distro
version:

install uhci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i uhci-hcd
install ohci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i ohci-hcd

Unless a modutils that's more recent than mine (3.2.2) doesn't require
the separate "modprobe -i"; that's possible.

(And I was coming at this from entirely the wrong angle...)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (4 preceding siblings ...)
  2008-11-22  2:46 ` Bryan Kadzban
@ 2010-02-22  6:42 ` Andrey Borzenkov
  2010-02-22  7:00 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Robby Workman
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Andrey Borzenkov @ 2010-02-22  6:42 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: Text/Plain, Size: 1205 bytes --]

This is in 2.6.33-rc8 currently but has been true for a long time.

Ever since my distribution completely switched to (hot-/cold-)plugging 
all needed modules I get this:

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, 
not after

During cold plugging uhci comes before ehci simply by virtue of 
directory traversal order:

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI 
Controller #1 (rev 02)


{pts/1}% ls -f1 /sys/devices/pci0000:00
[...]
0000:00:1d.0/
0000:00:1d.1/
0000:00:1d.2/
0000:00:1d.7/
[...]

So my question is - is the warning still true? How serious problems can 
result if uhci is loaded before ehci?

Does it make sense to workaround it in udev or may be trivial

install uhci_hcd mdprobe ehci_hcd; modprobe --ignore-install uhci_hcd

would be enough?

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (5 preceding siblings ...)
  2010-02-22  6:42 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
@ 2010-02-22  7:00 ` Robby Workman
  2010-02-22  7:30 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Robby Workman @ 2010-02-22  7:00 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

On Mon, 22 Feb 2010 09:42:31 +0300
Andrey Borzenkov <arvidjaar@mail.ru> wrote:

> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> Warning! ehci_hcd should always be loaded before uhci_hcd and
> ohci_hcd, not after
> 
> [snipped]
> 
> So my question is - is the warning still true? How serious problems
> can result if uhci is loaded before ehci?
> 
> Does it make sense to workaround it in udev or may be trivial
> 
> install uhci_hcd mdprobe ehci_hcd; modprobe --ignore-install uhci_hcd
> 
> would be enough?


That's basically what we did:

$ cat /etc/modprobe.d/usb-controller.conf 
# Make sure that ehci-hcd is always loaded before uhci-hci
# # or ohci-hcd to prevent a kernel warning:
install uhci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i uhci-hcd
install ohci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i ohci-hcd

-RW

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (6 preceding siblings ...)
  2010-02-22  7:00 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Robby Workman
@ 2010-02-22  7:30 ` Andrey Borzenkov
  2010-02-22 15:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Alan Stern
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Andrey Borzenkov @ 2010-02-22  7:30 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: Text/Plain, Size: 1399 bytes --]

On Monday 22 of February 2010 10:00:53 Robby Workman wrote:
> On Mon, 22 Feb 2010 09:42:31 +0300
> 
> Andrey Borzenkov <arvidjaar@mail.ru> wrote:
> > ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> > Warning! ehci_hcd should always be loaded before uhci_hcd and
> > ohci_hcd, not after
> > 
> > [snipped]
> > 
> > So my question is - is the warning still true? How serious problems
> > can result if uhci is loaded before ehci?
> > 
> > Does it make sense to workaround it in udev or may be trivial
> > 
> > install uhci_hcd mdprobe ehci_hcd; modprobe --ignore-install
> > uhci_hcd
> > 
> > would be enough?
> 
> That's basically what we did:
> 
> $ cat /etc/modprobe.d/usb-controller.conf
> # Make sure that ehci-hcd is always loaded before uhci-hci
> # # or ohci-hcd to prevent a kernel warning:
> install uhci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i uhci-hcd
> install ohci-hcd /sbin/modprobe ehci-hcd ; /sbin/modprobe -i ohci-hcd
> 

The problem is this dependency strikes back in other places as well. 
E.g. I want to find out drivers for my USB keyboard to be loaded in 
initrd. Natural way is to walk up device tree collecting them - which 
leaves me with uhci (or ohci). Now I must manually do not forget to put 
in ehci, although strictly speaking I do not need it (in initrd) at all.

Kernel based solution would really be nice ...

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (7 preceding siblings ...)
  2010-02-22  7:30 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
@ 2010-02-22 15:35 ` Alan Stern
  2010-02-22 15:37 ` Alan Stern
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Alan Stern @ 2010-02-22 15:35 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 22 Feb 2010, Andrey Borzenkov wrote:

> This is in 2.6.33-rc8 currently but has been true for a long time.
> 
> Ever since my distribution completely switched to (hot-/cold-)plugging 
> all needed modules I get this:
> 
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, 
> not after
> 
> During cold plugging uhci comes before ehci simply by virtue of 
> directory traversal order:
> 
> 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #1 (rev 02)
> 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #2 (rev 02)
> 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI 
> Controller #3 (rev 02)
> 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI 
> Controller #1 (rev 02)
> 
> 
> {pts/1}% ls -f1 /sys/devices/pci0000:00
> [...]
> 0000:00:1d.0/
> 0000:00:1d.1/
> 0000:00:1d.2/
> 0000:00:1d.7/
> [...]
> 
> So my question is - is the warning still true? How serious problems can 
> result if uhci is loaded before ehci?

The warning is accurate, but it isn't terribly serious.  When uhci-hcd
is loaded first, devices will initially connect through the UHCI
controllers.  Then when ehci-hcd is loaded later, the devices will be
disconnected and they will reconnect through the EHCI controller.  
Those devices which aren't high-speed will then be routed back to the
UHCI controllers.

Usually there's no harm done, but the disconnections will generate some
bad-looking log messages, and it's possible that some devices will get
confused by being disconnected in the middle of an operation.  If
ehci-hcd is loaded first, none of these disconnection issues arise.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (8 preceding siblings ...)
  2010-02-22 15:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Alan Stern
@ 2010-02-22 15:37 ` Alan Stern
  2010-02-28 17:16 ` Pozsar Balazs
  2010-02-28 21:46 ` Alan Stern
  11 siblings, 0 replies; 13+ messages in thread
From: Alan Stern @ 2010-02-22 15:37 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 22 Feb 2010, Andrey Borzenkov wrote:

> The problem is this dependency strikes back in other places as well. 
> E.g. I want to find out drivers for my USB keyboard to be loaded in 
> initrd. Natural way is to walk up device tree collecting them - which 
> leaves me with uhci (or ohci). Now I must manually do not forget to put 
> in ehci, although strictly speaking I do not need it (in initrd) at all.
> 
> Kernel based solution would really be nice ...

There _is_ a kernel-based solution.  Build ehci-hcd into the kernel 
instead of building it as a module.  Then it will always come before 
uhci-hcd -- even if uhci-hcd is also built into the kernel.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (9 preceding siblings ...)
  2010-02-22 15:37 ` Alan Stern
@ 2010-02-28 17:16 ` Pozsar Balazs
  2010-02-28 21:46 ` Alan Stern
  11 siblings, 0 replies; 13+ messages in thread
From: Pozsar Balazs @ 2010-02-28 17:16 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Feb 22, 2010 at 10:35:33AM -0500, Alan Stern wrote:
> The warning is accurate, but it isn't terribly serious.  When uhci-hcd
> is loaded first, devices will initially connect through the UHCI
> controllers.  Then when ehci-hcd is loaded later, the devices will be
> disconnected and they will reconnect through the EHCI controller.  
> Those devices which aren't high-speed will then be routed back to the
> UHCI controllers.
> 
> Usually there's no harm done, but the disconnections will generate some
> bad-looking log messages, and it's possible that some devices will get
> confused by being disconnected in the middle of an operation.  If
> ehci-hcd is loaded first, none of these disconnection issues arise.

Hi,

Sorry if this is too offtopic: is there a way to force this kind of usb 
reconnect from userspace? Either for all, or for particular device.

Thanks

-- 
pozsy

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Warning! ehci_hcd should always be loaded before uhci_hcd and
  2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
                   ` (10 preceding siblings ...)
  2010-02-28 17:16 ` Pozsar Balazs
@ 2010-02-28 21:46 ` Alan Stern
  11 siblings, 0 replies; 13+ messages in thread
From: Alan Stern @ 2010-02-28 21:46 UTC (permalink / raw)
  To: linux-hotplug

On Sun, 28 Feb 2010, Pozsar Balazs wrote:

> Hi,
> 
> Sorry if this is too offtopic: is there a way to force this kind of usb 
> reconnect from userspace? Either for all, or for particular device.

If you do "rmmod ehci-hcd" followed by "modprobe ehci-hcd", it will 
have the effect you're asking about.

Alan Stern


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-02-28 21:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-21 14:54 Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
2008-11-21 16:25 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
2008-11-21 16:25 ` Bryan Kadzban
2008-11-21 16:47 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after Toralf Förster
2008-11-21 17:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Greg KH
2008-11-22  2:46 ` Bryan Kadzban
2010-02-22  6:42 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
2010-02-22  7:00 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Robby Workman
2010-02-22  7:30 ` Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd Andrey Borzenkov
2010-02-22 15:35 ` Warning! ehci_hcd should always be loaded before uhci_hcd and Alan Stern
2010-02-22 15:37 ` Alan Stern
2010-02-28 17:16 ` Pozsar Balazs
2010-02-28 21:46 ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.