From: Jon Masters <jcm@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [RFC] binary firmware and modules
Date: Sat, 15 Apr 2006 09:10:55 +0100 [thread overview]
Message-ID: <1145088656.23134.54.camel@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Hi folks,
Right now, various kernel modules are being migrated over to use
request_firmware in order to pull in binary firmware blobs from userland
when the module is loaded. This makes sense.
However, there is right now little mechanism in place to automatically
determine which binary firmware blobs must be included with a kernel in
order to satisfy the prerequisites of these drivers. This affects
vendors, but also regular users to a certain extent too.
The attached patch introduces MODULE_FIRMWARE as one way of advertising
that a particular firmware file is to be loaded - it will then show up
via modinfo and could be used e.g. when packaging a kernel. I've also
given an example via the QLogic gla2xxx driver.
I expect that there are better ways to do this, so I'd like comments
from those closer to the ground on this problem. In particular, it would
be better if drivers didn't have to list the firmware twice - once in
request_firmware and then via MODULE_FIRMWARE. Maybe API change time?
Jon.
P.S. Until I fix evolution again, I'm using an attachment.
[-- Attachment #2: module_firmware.patch --]
[-- Type: text/x-patch, Size: 1205 bytes --]
diff -urN linux-2.6.16.2_orig/drivers/scsi/qla2xxx/qla_os.c linux-2.6.16.2_dev/drivers/scsi/qla2xxx/qla_os.c
--- linux-2.6.16.2_orig/drivers/scsi/qla2xxx/qla_os.c 2006-04-07 17:56:47.000000000 +0100
+++ linux-2.6.16.2_dev/drivers/scsi/qla2xxx/qla_os.c 2006-04-12 20:22:15.000000000 +0100
@@ -2765,3 +2765,9 @@
MODULE_DESCRIPTION("QLogic Fibre Channel HBA Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(QLA2XXX_VERSION);
+MODULE_FIRMWARE("ql2100_fw.bin");
+MODULE_FIRMWARE("ql2200_fw.bin");
+MODULE_FIRMWARE("ql2300_fw.bin");
+MODULE_FIRMWARE("ql2322_fw.bin");
+MODULE_FIRMWARE("ql6312_fw.bin");
+MODULE_FIRMWARE("ql2400_fw.bin");
diff -urN linux-2.6.16.2_orig/include/linux/module.h linux-2.6.16.2_dev/include/linux/module.h
--- linux-2.6.16.2_orig/include/linux/module.h 2006-04-07 17:56:47.000000000 +0100
+++ linux-2.6.16.2_dev/include/linux/module.h 2006-04-12 13:51:56.000000000 +0100
@@ -155,6 +155,8 @@
*/
#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
+#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
+
/* Given an address, look for it in the exception tables */
const struct exception_table_entry *search_exception_tables(unsigned long add);
next reply other threads:[~2006-04-15 8:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 8:10 Jon Masters [this message]
2006-04-15 9:54 ` [RFC] binary firmware and modules 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
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=1145088656.23134.54.camel@localhost.localdomain \
--to=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.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