On Fri, Jun 03, 2005 at 02:57:23PM -0500, [email protected] wrote:
> > > At what point I should be calling request_firmware?
> >
> > Never, you should call request_firmware_nowait() instead. And do it
> > from your module init function.
> >
> > > As my driver does
> > > not have any entry points. In this driver it is called when the user
> is
> > > ready to download the firmware image (when it echoes the firmware
> image
> > > name). Also the driver needs to be resident for handling multiple
> such
> > > requests; that's why cannot do this at driver init time.
> >
> > That's what request_firmware_nowait() is for.
> >
> But isn't request_firmware_nowait a one time deal.
Yes.
> It creates a kernel thread which will call the cont function once and
> end it.
Yes.
And in that cont function, you can do whatever you want, like handle the
firmware given to you, copy it off to whereever you need to, and if you
want, call request_firmware_nowait again for another firmware to be sent
to you...
> In that case I will have to unload and reload the driver every time
> before doing an update.
No, see above.
> Also driver's unload has to free the allocated memory; this will not
> serve the purpose of this driver.
See above.
> > > When ever the user echoes the file name, it gets passed on to
> > > request_firmware and the $FIRMWARE env gets populated with the file
> > > name. thus making the hotplug code to automatically load the image
> which
> > > is passed back as fw->data and fw->size.
> >
> > It's easier for the user to just copy the firmware to the sysfs file
> > whenever they want to. No messing with hotplug events or filenames.
> >
> I must be missing some things here. Can copying the data to the sysfs
> file with normal attributes work?
The firmware class creates a sysfs file. That is what I am referring to
here.
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]