> > If I "modprobe usb-ohci" (ditto with UHCI HCDs) "usbcore" is
> > automatically loaded, by virtue of those dependencies.
>
> yeah... but up until now i saw in all the mails talk about 'modprobe usbcore'.
> This does not work. You can easily load usbcore without a HC (not very
> usefull though;).
Well, see the attached patch. I've not sent it along before since it
really ought to fail in that all-modular case when there is no HC.
> I made this remark because it would make it impossible for usb-core to unload
> itself if there wasn't a HC present (which seemed to be suggested somewhere).
> There will never be a HC driver if usbcore isn't loaded yet... it can be done
> by trying to modprobe usb-uhci or modprobe usb-ohci. I am not sure whether
> modprobe will unload the usbcore again if the HC insmod failed.
In the attached patch, the "code goes here" spot should be clearly
marked XXX. Get the list of busses, is it empty, if so cleanup and
return -ENODEV. I ran into strange cleanup failures.
(We can't really care about HC modprobe failure except when we find
no busses whatsoever...)
Once that XXX gets replaced with working code, "modprobe usbcore"
will fail cleanly when there's no USB controller; no system resources
consumed in such cases.
> > I _think_ that should let the PCMCIA subsystem handle all
> > that it needs to handle. It sees a new USB card, modprobes
> > its HCD (usb-ohci probably), and then USB is operational
> > because (a) usbcore got modprobed due to dependencies,
> > (b) a 'usbd' got started (perhaps it's using KUSBD, or a
> > post-install started a user-mode USBD), often even (c) the
> > usbdevfs got mounted as a post-install too.
>
> or more, what if I already have an ohci controller and add an extra ohci
> controller on a pcmcia card? Your modprobe would fail, but is the driver's
> probe function called again ?
Good question. I suspect "no" is the answer; I didn't see the
USB kernel drivers adding their probe functions to a table, it
looked instead like they scanned a table.
> IMHO, the problem with the current implementations/designs is not really
> pluggin' devices, it's pluggin' (PnP supporting) busses.
Nicely put.
- Dave
hcd-kmod.patch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]