Matthew Dharm wrote:
>
> On Thu, 6 Apr 2000, Vojtech Pavlik wrote:
>
> > I could easily add MOD_INC_COUNT to a dev->open callback in usbmouse.c.
> > That's no problem. However, this would also mean I'll never be able to
> > remove usbkbd.o or hid.o, because a keyboard is always in use with the
> > console system.
>
> I think this is the crux of the problem... the keyboard and mouse are
> special cases because they're really always in use.
At least potentially so, if such a device is physically connected.
I think host controller drivers are in the same boat. An "in-use"
HCD should not be subject to unloading; and when any of the devices
on a given bus is in use, then clearly the HCD is too. (Unloading
would disconnect all those devices ...)
I do think the suggestion to split out "automatically removable" and
"in use" notions is probably right. If I've got a USB HCI on my
box that's not _currently_ in use it shouldn't be automatically
removed, though I should be able to do it manually. If it's in
current use (nonzero usage count) I shouldn't be able to manually
unloaded it.
So maybe some drivers (mouse, keybd, HCI) need to be able to give
some advice to the module subsystem: "don't automatically unload,
but administrators can request manual unloading".
> Things like cameras, disks, ethernet dongles, etc. are not always in use,
> and we have to be sure that we're managing them properly.
Yes, this stuff has bothered me. USB modules that are
actually in use shouldn't be subject to automatic unloading
the way they now seem to be.
- Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]