On Fri, Jun 02, 2000, David Brownell <[EMAIL PROTECTED]> wrote:
> > > Not that I've had occasion yet to look at that code, but why
> > > shouldn't the PCI code just directly modprobe the right driver?
> > > 
> > > After all, the OHCI and UHCI (and EHCI :-) controllers will
> > > have different PCI identifiers.
> > 
> > This would require a large table of devices/classes and their drivers in
> > the kernel to know what to do.
> > 
> > This is probably best left in userspace.
> 
> As it would be.  The table would be what "modprobe" consults, which
> is set up as aliases ... something like 'pci-controller-0c-0310' (OHCI)
> or 'pci-controller-00-0310' (UHCI).  Something in the PCI init sequence
> would request_module() to get drivers for unclaimed PCI controllers.
> There may be some reason not to have PCI code do that yet, but that's
> not the only way to improve things a lot for USB.

Remember, people want this to load on demand when the device is used,
not during PCI init.

> A related fix would have usb_init (or usb_module, why are there two
> names for one function??) learn that since each HCD can be compiled as
> a module, it should request_module("usb-ohci") etc as needed.  Without
> trying that, I'd expect it would let a userland "modprobe usbcore"
> (likely from /etc/rc) trigger full USB init ... including post-installs
> to mount the usbdevfs and start the usbd.  (Some work is needed to get
> the modprobe to fail cleanly when no USB controllers are registered.)

The user may not want the usb-ohci driver loaded everytime if they don't
actually have the HC on the system.

> Given that, and PCMCIA services knowing how to "modprobe usb-ohci",
> I think most current configurations would be handled as cleanly as
> the 2.4 distributions are going to need for a long time:  update RC
> scripts, PCMCIA configs, and modules.conf ... and get 'usbd' alive!

I suppose PCMCIA is different in that when a user inserts a card, they
want to use at that moment.

This may be true for deviecs on the USB bus as well, but I'm not sure if
this is necessarily true for the HC on most non PCMCIA machines.

> > The new PCI code has something like this, but the driver must register
> > itself first. It's the old chicken and the egg problem.
> 
> That'd come up when using the PCI device for booting.  Workaround
> is to not to use modular drivers (like OHCI/USB-Ethernet/...) there,
> though I'm not sure whether the USB code now handles that case.
> 
> Or is there some other issue?

Not using modular drivers is not acceptable. The purpose of modules is
to load the module on demand while the system is running and we should
make sure that we do that. If we don't, there's very little reason for
modules at all.

JE


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to