Tom Sailer introduced a kernel patch on 2/11/2k
that will do this.  It depends on CONFIG_KMOD
being true/set (or I guess you could clone that
code if you HAD to).

The function is exec_usermodehelper().  It's in
linux/kernel/kmod.c.

Here's Tom's email (without the patch):
<quote>
kmod calls a user mode helper program (modprobe) to do the work.
I find this concept generally useful, I have a device that requires
complex initialization, which is currently done in userspace with
a helper program. I'd like to keep it that way.

Exec'ing a user mode program however is not so straigtforward,
everytime I look into kmod.c the code gets more complex 8-)
Up to now I just copied the code from kmod.c into my driver,
but the code duplication starts to get annoying, furthermore
a couple of routines (free_uid and flush_signal_handlers)
are not even exported.

So I'd like to export the exec-facility of kmod.

The following is a patch to do this.

Comments?

Tom
</quote>

~Randy
___________________________________________________
|Randy Dunlap     Intel Corp., DAL    Sr. SW Engr.|
|randy.dunlap.at.intel.com            503-696-2055|
|NOTE:  Any views presented here are mine alone   |
|and may not represent the views of my employer.  |
|_________________________________________________|

> -----Original Message-----
> From: Greg KH [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 23, 2000 4:41 PM
> To: Alex Holden
> Cc: [EMAIL PROTECTED]
> Subject: Re: [linux-usb] LiteOn LNE100TX/NetGear101c USB to Ethernet
> 
> 
> On Thu, Mar 23, 2000 at 09:51:28PM +0000, Alex Holden wrote:
> > On Thu, 23 Mar 2000, Alan Cox wrote:
> > > but firmware supplying. I don't think a 
> usb-firware-daemon is out of the
> > > question.
> > 
> > A good place to do this would be to give usbd the 
> capability to start a
> > user space firmware loader (potentially a different one for 
> each download
> > protocol) with a specified bus/device number and firmware 
> file whenever it
> > detects the attachment of specific vid/pid pairs before it 
> either loads
> > the kernel module or starts the user space device driver required to
> > handle that particular device. There are a lot of ezusb 
> based devices
> > being developed at the moment, and it would be a good idea 
> to build a nice
> > generic solution to the firmware/driver loader problem now 
> rather than
> > each device ending up having it's own loader.
> 
> I agree that the current way of putting the firmware in the 
> driver isn't
> the best way (makes the driver HUGE, take a look at the size of
> usb-serial with all of the devices selected), and some way of having a
> firmware loader would be great. The biggest problem is that 
> of the three
> devices I have right here, all 3 have a different protocol 
> that is used
> in sending the firmware down (2 of them are EZUSB devices, 
> and they both
> do things differently, due to the ability of a manufacturer to change
> the EZUSB bootloader code.).
> 
> I'd be happy right now with each device having it's own 
> loader, that way
> the kernel size could shrink a bunch. It would be a good start. 
> 
> Anyone have any ideas of how khubd could kick off a user 
> space program,
> or have usbdevfs do it? 
> 
> greg k-h
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to