Re: Q: using kmod to invoke a user application

Matthew Kirkwood (weejock@ferret.lmh.ox.ac.uk)
Tue, 6 Apr 1999 14:47:07 +0100 (GMT)


On Tue, 6 Apr 1999, Jim Chapman wrote:

> Specifically, my modularized net driver would like to invoke an app in
> user space when it is _opened_. The app does some private ioctl()'s to
> the driver (to download the NIC's firmware). Is there a way to have a
> modularized driver invoke a user-mode program? (I am trying to avoid
> bloating my driver with the downloadable NIC firmware. I'd like to load
> the firmware during the open() procedure and stall the open until the
> download completes. There is no FLASH on the NIC so the NIC firmware
> must be downloaded every time it is initialized.)

If the device is modularised, you should be able to put something like:

post-install my_driver /usr/sbin/load_firmware

in /etc/conf.modules. The problems there are:
1. I don't know whether the call to open() will continue once the driver
is loaded, or once modprobe has finished doing its thing,
2. It only works if the driver is modularised

Personally, I'd put the firmware in the driver and fight for the inclusion
of the patches which make __init{func,data} work for modules :)

Matthew.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/