Re: Question about EHCI and UHCI/OHCI driver load

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

 



On Wed, May 18, 2011 at 12:02:17PM -0400, Alan Stern wrote:
> On Wed, 18 May 2011, Sarah Sharp wrote:
> 
> > On Tue, May 17, 2011 at 03:12:36PM -0700, Greg KH wrote:
> > > On Tue, May 17, 2011 at 02:46:26PM -0700, Sarah Sharp wrote:
> > > > I see that ehci-hcd.c has a warning in when either the UHCI or OHCI
> > > > driver is loaded before the EHCI driver:
> > > > 
> > > >         set_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
> > > >         if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) ||
> > > >                         test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
> > > >                 printk(KERN_WARNING "Warning! ehci_hcd should always be loaded"
> > > >                                 " before uhci_hcd and ohci_hcd, not after\n");
> > > > 
> > > > What actually prevents the UHCI or OHCI driver from being loaded before
> > > > the EHCI driver?  Is it left up to userspace?
> > > 
> > > Yes.  Hopefully all of the distros now have properly modprobe rules to
> > > load these before the ehci driver, otherwise we would be getting the
> > > kernel warnings sent to us :)
> > 
> > Great.  Tony Luck had mentioned he saw this warning on boot on some box
> > of his, but hasn't been able to reproduce it.  Where can I find these
> > modprobe rules files?  Is it the same for every distro, or do different
> > distros store them in different places?
> 
> Often they aren't in the form of udev rules at all.  The script files 
> in an initramfs image may be set up to explicitly load the drivers in 
> the proper order.

Also, most distros are building these modules into the kernel directly,
solving this issue that way.

If not, look in the /etc/modprobe.conf file, or in the /etc/modprobe.d/
files, it depends on the distro.

> > > > Since PCI devices can be initialized in parallel, even if the EHCI
> > > > driver is loaded first, that doesn't guarantee that the PCI probe for
> > > > the EHCI controller actually finishes before the UHCI/OHCI PCI probe,
> > > > right?
> > > 
> > > I didn't think that PCI devices were initialized in parallel all that
> > > often, so this might be pretty rare.
> > 
> > Hmm, ok, HPA was muttering something on IRC about some PCI core rework
> > to make it possible to initialize PCI devices in parallel, so it might
> > be new.
> 
> I asked about parallel probing of PCI devices at one point.  Linus said
> he wasn't in favor of it because of the potential for problems like
> this one.

I enabled this a number of years ago and found that it really didn't
speed anything up, and just exposed a ton of race conditions that no one
had ever noticed before.

Instead I think we have been enabling multi-threaded work in the drivers
that need it the most (like the libata drivers) instead of the pci core.

thanks,

greg k-h
--
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