> > Now I'm going to have a look at the ehci USB2.0 driver; I seems that it 
> > needs
> > 5 seconds to "initialize" (time spent between the "npe: .. ehci0" message
> > and "genunix: ehci0 is ...").
> >
> > And the USB disk that happens to be connected to that ehci USB 2.0 
> > controller
> > delays the boot by another five seconds...
> 
> Which makes me wonder, is there anything we can do to "background"
> certain device detection probing so that the login
> process can start?

The comments in  i_ddi_forceattach_drivers() explains why this isn't
done for ehci/uhci/ohci:

http://src.opensolaris.org/source/s?defs=i_ddi_forceattach_drivers

   3165 void
   3166 i_ddi_forceattach_drivers()
   3167 {
   3168         /*
   3169          * On i386, the USB drivers need to load and take over from the
   3170          * SMM BIOS drivers ASAP after consconfig(), so make sure they
   3171          * get loaded right here rather than letting the thread do it.
   3172          *
   3173          * The order here is important.  EHCI must be loaded first, as
   3174          * we have observed many systems on which hangs occur if the
   3175          * {U,O}HCI companion controllers take over control from the 
BIOS
   3176          * before EHCI does.  These hangs are also caused by BIOSes 
leaving
   3177          * interrupt-on-port-change enabled in the ehci controller, so 
that
   3178          * when uhci/ohci reset themselves, it induces a port change on
   3179          * the ehci companion controller.  Since there's no interrupt 
handler
   3180          * installed at the time, the moment that interrupt is 
unmasked, an
   3181          * interrupt storm will occur.  All this is averted when ehci is
   3182          * loaded first.  And now you know..... the REST of the story.
   3183          *
   3184          * Regardless of platform, ehci needs to initialize first to 
avoid
   3185          * unnecessary connects and disconnects on the companion 
controller
   3186          * when ehci sets up the routing.
   3187          */
   3188         (void) ddi_hold_installed_driver(ddi_name_to_major("ehci"));
   3189         (void) ddi_hold_installed_driver(ddi_name_to_major("uhci"));
   3190         (void) ddi_hold_installed_driver(ddi_name_to_major("ohci"));
   3191 

> In other words, do we really need to delay the boot process to detect
> USB storage devices unless one of the devices is required to be
> mounted *at boot* or is the boot device itself?

No, the USB 2.0 HDD that is connected to by system at boot time isn't
the boot device itself.

Attaching the scsa2usb driver early during boot time seems to just a side effect
of force-attaching the ehci driver, which will enumerate the USB devices
connected to that usb controller.
 
 
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to