public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Victor Hugo <victor@vhugo.net>
Cc: linux-kernel@vger.kernel.org,
	Victor Castro <victorhugo83@yahoo.com>,
	Jon Masters <jonathan@jonmasters.org>
Subject: Re: [PATCH][RFC] request_firmware examples and MODULE_FIRMWARE
Date: Tue, 05 Sep 2006 21:16:20 +0200	[thread overview]
Message-ID: <1157483780.5963.44.camel@localhost> (raw)
In-Reply-To: <508B6A67-CA5B-4A81-B868-BF8A03D78888@vhugo.net>

Hi Victor,

> > actually it has never been really a filename. It was a simple pattern
> > that the initial hotplug script and later the udev script mapped  
> > 1:1 to
> > a filename on your filesystem. If you check the mailing list  
> > archives of
> > LKML and linux-hotplug you will see that I always resisted in allowing
> > drivers to include a directory path in that call. A couple of people
> > tried this and it is not what it was meant to be.
> >
> > The MODULE_FIRMWARE approach simply makes this pattern visible via
> > modinfo, because otherwise you would have to scan the source code to
> > find this pattern. And to make it use you have to apply the same  
> > policy
> > the firmware script is applying when choosing the file. Currently this
> > is a 1:1 mapping.
> 
> You're right, I should have been more specific when I said  
> "filename", I really meant a 1:1 mapping to a file in /lib/firmware.
> 
> My question is, should we have a generic 1:1 mapping and make it  
> visible through MODULE_FIRMWARE.

please re-read my email and the initial thread about MODULE_FIRMWARE.
The MODULE_FIRMWARE extension only export the pattern used by
request_firmware(), because otherwise some tools don't know what a
kernel driver actually expects.

It happens to be a 1:1 mapping, but that is pure coincidence and a
little bit of laziness from the early users (mainly me) when providing
the first firmware script for the hotplug package. For all my drivers, I
don't need any fancy mapping.

>   Or like Jon Masters suggested have specific version numbers in the  
> pattern and have them map to specific versions in /lib/firmware and  
> make them all visible through MODULE_FIRMWARE.  I believe the  
> reasoning behind this was to make packaging drivers easier.

No. We need to make the actual file for loading the firmware appear
under the device in sysfs. So the userspace can read extra information
from the driver or device and then make its decision on which firmware
to load.

> I believe that we should have a generic mapping in the driver (i.e,  
> "firmware.bin") and let the admin or the userspace hotplug scripts  
> take care of filename policy with a link to the correct firmware  
> version.
> 
> example :
> 
> firmware.bin -> firmware-xyz.bin
> 
> The main reason for not including speciic mapping in the driver is  
> that everytime a new firmware version is released the driver has to  
> be updated and recompiled.  Its much easier to change a hotplug script.

I say, leave this up to the driver. For a couple of drivers this works
perfectly fine and I don't see any need to change my drivers and make
them more complex if it is not needed.

>From my point I don't see any advantage to make firmware loading more
complex from the kernel perspective. All this weird stuff needs to be
done in userspace. Our current way works quite good for a number devices
that need binary firmware.

I think it is better to first collect the needs of the driver authors
and make sure they understand their own needs. This is not always true.
And then we can discuss any extensions to change something. And I prefer
to have actual hardware and their drivers as an example.

The MODULE_FIRMWARE() extension is an easy and simple extension that
goes along with the current idea of request_firmware().

Regards

Marcel



  reply	other threads:[~2006-09-05 19:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04  2:55 [PATCH][RFC] request_firmware examples and MODULE_FIRMWARE Victor Hugo
2006-09-04 21:02 ` Andrew Morton
2006-09-04 21:16   ` Jon Masters
2006-09-05  7:33 ` Marcel Holtmann
2006-09-05 18:26   ` Victor Hugo
2006-09-05 19:16     ` Marcel Holtmann [this message]
2006-09-06 16:42     ` Jon Masters
2006-09-07 15:10       ` Marcel Holtmann
2006-09-07 15:01         ` Jon Masters
  -- strict thread matches above, loose matches on Subject: below --
2006-09-04  8:45 Victor Hugo
     [not found] <20060904083908.38953.qmail@web411.biz.mail.mud.yahoo.com>
2006-09-04 10:41 ` Alan Cox

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=1157483780.5963.44.camel@localhost \
    --to=marcel@holtmann.org \
    --cc=jonathan@jonmasters.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=victor@vhugo.net \
    --cc=victorhugo83@yahoo.com \
    /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