lkml.org 
[lkml]   [2003]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: firmware separation filesystem (fwfs)
On Wed, Apr 16, 2003 at 12:31:21PM +0100, Alan Cox wrote:
> How is this better than simply having your hotplug helper load
> the firmware from disk ? Its nice code but you have to ask the
> question "why". I don't want the firmware wasting ram, I don't
> need the firmware fs wasting ram. I may need to load the right
> firmware from a choice of 16 odd types (usb_serial has some
> examples there).

The obvious case is where it's impossible, or at least difficult/messy
for userspace to directly access the device to upload the firmware.
The latter is the case for the orinoco devices: the same firmwares can
be used by USB, PCMCIA and PCI devices - these all have somewhat
different register configurationss and different upload methods.
Having an upload program that handles all these cases (not to mention
endian and IO vs. memory mapped registers) seems silly when the driver
already knows how to talk to the devices properly (actually we don't
do firmware upload yet, but one day).

The driver could provide a chardev interface to upload the firmware
through, but that's a lot more work - and there are issues of mapping
the right chardev to the right network device instance, coping with
the device in half-alive mode (i.e. initialized enough that firmware
can be uploaded, but not ready to use because there's no firmware yet)
etc.

I believe the idea is that hotplug (or other scripts) would copy the
appropriate firmware into the relevant path in fwfs, so you don't need
RAM for every firmware variant - just the one you're using. And if
we're really worried about memory it shouldn't be hard for the driver
to arrange to unlink the firmware image once it's done with it (at the
cost of not being able to reload the firmware on a reset/reinitialize,
which might be sensible or necessary for some devices).

My personal feeling is that this would probably make more sense as a
type of sysfs node, rather than a separate filesystem, but the basic
concept seems sound.

--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.054 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site