Re: Load hid.o module synchronously?

Patrick J. LoPresti
2004-05-06T14:06:51Z

Oliver Neukum <oliver@neukum.org> writes:

> The set of devices connected to the machine is not static. Waiting
> until all hardware is ready is very hard to even define.

It is very easy to define for 99.999% of all keyboards, which start
off connected and stay connected.

This should be simple. I want to load a driver at boot time and wait
until it either binds to something or fails to do so. If the user is
adding or removing hardware while the module is loading, I simply do
not care what the system does. But if the hardware is not changing, I
care a great deal... And the latter case is perfectly well-defined.

> > be glad to use any other mechanism to achieve the same effect; I just
> > have not seen one yet.
>
> Issue ioctl() USBDEVFS_CONNECT through usbfs. It does a synchronous
> probe for a specific device.

I suppose this would solve my USB keyboard problem. But a) it seems
very complex for such a simple need; and b) it does not work for
non-USB devices, which are also causing me grief.

- Pat