mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: ranty@debian.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: firmware separation filesystem (fwfs)
Date: Thu, 17 Apr 2003 11:23:21 +1000	[thread overview]
Message-ID: <20030417012321.GB9219@zax> (raw)
In-Reply-To: <1050508028.28586.126.camel@dhcp22.swansea.linux.org.uk>

On Wed, Apr 16, 2003 at 04:47:09PM +0100, Alan Cox wrote:
> On Mer, 2003-04-16 at 17:36, Manuel Estrada Sainz wrote:
> >  On the other hand, there are already many drivers in the kernel that
> >  include firmware in headers, keyspan, io_edgeport, dabusb, ser_a2232,
> >  sym53c8xx_2, ...
> 
> But so would loading it from hotplug via ioctl. It might be we want
> a clean hotplug way to ask for 'firmare for xyz'.

True, but ioctl()s are horrid.  And the driver needs to set up a
suitable device to which the ioctl() is applied, and deal with binding
the right image to the right instance, which can get messy in some
cases.  As I see it the chief purpose of fwfs, or an equivalent sysfs
formulation would be to provide a clean mechanism for passing firmware
images to the kernel - figuring out which image to provide and
supplying it at the relevant moment can and should be the job of
hotplug or a similar userland helper.

Incidentally another approach that also avoids nasty ioctl()s would be
to invoke the userland helper with specially set up FD 1, which lets
the kernel capture the program's stdout.  When the driver needs a
firmware it invokes the helper, which figures out the relevant image
from its parameters and cats it.  The driver (presumably sleeping
waiting for this) grabs the image, stuffs it into the hardware, then
throws it away.

-- 
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

  parent reply	other threads:[~2003-04-17  1:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-16  0:57 Manuel Estrada Sainz
2003-04-16 11:31 ` Alan Cox
2003-04-16 14:46   ` David Gibson
2003-04-16 16:36     ` Manuel Estrada Sainz
2003-04-16 15:47       ` Alan Cox
2003-04-16 16:57         ` Riley Williams
2003-04-17 13:43           ` Alan Cox
2003-04-17 13:43           ` Alan Cox
2003-04-17  1:23         ` David Gibson [this message]
2003-04-17 13:12           ` Alan Cox
2003-04-19 20:41             ` Manuel Estrada Sainz
2003-04-19 21:52               ` Alan Cox
2003-04-20 19:26                 ` Manuel Estrada Sainz
2003-04-17  0:17 Perez-Gonzalez, Inaky
2003-04-17  2:00 Perez-Gonzalez, Inaky
2003-04-17  3:31 ` Manuel Estrada Sainz
2003-04-17  4:06   ` Greg KH
2003-04-17  3:48 ` 'David Gibson'
2003-04-17  4:07 Perez-Gonzalez, Inaky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030417012321.GB9219@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranty@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®