From: Marcel Holtmann <marcel@holtmann.org>
To: Duncan Sands <duncan.sands@math.u-psud.fr>
Cc: Arjan van de Ven <arjan@infradead.org>,
"John W. Linville" <linville@tuxdriver.com>,
Oliver Neukum <oliver@neukum.org>, Jon Masters <jcm@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] binary firmware and modules
Date: Mon, 17 Apr 2006 18:10:49 +0200 [thread overview]
Message-ID: <1145290250.26498.37.camel@localhost> (raw)
In-Reply-To: <200604171715.45252.duncan.sands@math.u-psud.fr>
Hi Duncan,
> > in order to not fall in the naming-policy trap: do we need a translation
> > layer here? eg the module asks for firmware-<modulename>
> > and userspace then somehow maps that to a full filename via a lookup
> > table?
>
> since the same module can handle different devices which need
> different firmware, firmware-<modulename> is not sufficient. An example
> is the speedtouch USB modems, which need different firmware depending on
> the modem revision. In fact each modem needs two blobs uploaded, a small
> one (stage 1 blob) followed by a large one (stage 2 blob). These blobs
> are fairly independant, for example a given stage 1 blob can work for a
> wider range of modem revisions than a given stage 2 blob. Also, the
> manufacturer made a bunch of exotic variations on the modem (all with
> the same product ids, but different revisions); I don't have a complete
> list, and I don't know which ones require special firmware. That means
> that the driver does not have a complete list of different firmware names.
> It could always use the same names "stage1" and "stage2", regardless of
> the revision, and expect the user to place the right firmware there; but
> then what about people who have multiple modems with different revisions
> (like me)? As a result of all this, the driver needs to export the following
> to userspace, to let user-space find the right firmware:
>
> (0) module name
> (1) stage 1 or stage 2
> (2) modem major revision number
> (3) modem minor revision number (I don't know if this is really needed,
> but I heard a rumour that it was: ISDN modems needing special firmware
> but only varying in their minor revision from non-ISDN modems IIRC).
>
> This is all exported in the hotplug environment. However, current hotplug
> scripts don't have any cleverness in them for handling this kind of thing
> (I don't know about udev).
we don't really have hotplug anymore. Now it is all handled by udev or
the udev helper programs.
For my drivers, I don't have this problem of different firmware images
for different versions and I personally don't really like abusing the
firmware name for some kind of revision control. However initially the
idea behind request_firmware() was that the userspace is totally dumb
and its only job is to copy a binary image from the filesystem into the
kernel memory, so it can be used by the driver. Another idea was that we
can reuse the firmware filenames from the Windows driver if they are
separate from the driver. This allowed us in most cases to tell the end
users to simply extract that file and copy it to /lib/firmware/ and
everything was working.
So for the fist step, I think a MODULE_FIRMWARE() extension (with maybe
and additional comment per firmware name) will be a good think to feed
back the information of firmware files to the userspace. After that we
might need to look into messed up devices and drivers. I also expect
that some WiFi drivers might have the same problem.
Regards
Marcel
next prev parent reply other threads:[~2006-04-17 16:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 8:10 [RFC] binary firmware and modules Jon Masters
2006-04-15 9:54 ` Oliver Neukum
2006-04-17 14:22 ` John W. Linville
2006-04-17 14:29 ` Arjan van de Ven
2006-04-17 14:38 ` Marcel Holtmann
2006-04-17 15:15 ` Duncan Sands
2006-04-17 16:10 ` Marcel Holtmann [this message]
2006-04-18 13:16 ` Jon Masters
2006-04-18 13:37 ` Duncan Sands
2006-04-18 14:14 ` Jon Masters
2006-04-18 15:14 ` Duncan Sands
2006-04-19 0:01 ` Jon Masters
2006-04-18 14:22 ` Marcel Holtmann
2006-04-18 14:59 ` Duncan Sands
2006-04-18 15:41 ` Marcel Holtmann
2006-04-19 13:28 ` Mark Lord
2006-04-19 13:37 ` Marcel Holtmann
2006-04-19 14:10 ` Jon Masters
2006-04-18 14:25 ` Marcel Holtmann
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=1145290250.26498.37.camel@localhost \
--to=marcel@holtmann.org \
--cc=arjan@infradead.org \
--cc=duncan.sands@math.u-psud.fr \
--cc=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=oliver@neukum.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