This is a note to let you know that I've just added the patch titled

    bnx2x: declare MODULE_FIRMWARE

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     bnx2x-declare-module_firmware.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From 150e40a6d8716c3076fe019b53ff27663c2adcb9 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Sat, 7 Nov 2009 11:53:39 +0000
Subject: bnx2x: declare MODULE_FIRMWARE

From: Ben Hutchings <[email protected]>

commit 45229b420f90bb6736dfeb7e491eb46cb02a3e9c upstream.

Replace run-time string formatting with preprocessor string
manipulation.

Signed-off-by: Ben Hutchings <[email protected]>
Acked-by: Eilon Greenstein <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/bnx2x_main.c |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -49,6 +49,7 @@
 #include <linux/prefetch.h>
 #include <linux/zlib.h>
 #include <linux/io.h>
+#include <linux/stringify.h>
 
 
 #include "bnx2x.h"
@@ -63,8 +64,13 @@
 #include <linux/firmware.h>
 #include "bnx2x_fw_file_hdr.h"
 /* FW files */
-#define FW_FILE_PREFIX_E1      "bnx2x-e1-"
-#define FW_FILE_PREFIX_E1H     "bnx2x-e1h-"
+#define FW_FILE_VERSION                                        \
+       __stringify(BCM_5710_FW_MAJOR_VERSION) "."      \
+       __stringify(BCM_5710_FW_MINOR_VERSION) "."      \
+       __stringify(BCM_5710_FW_REVISION_VERSION) "."   \
+       __stringify(BCM_5710_FW_ENGINEERING_VERSION)
+#define FW_FILE_NAME_E1                "bnx2x-e1-" FW_FILE_VERSION ".fw"
+#define FW_FILE_NAME_E1H       "bnx2x-e1h-" FW_FILE_VERSION ".fw"
 
 /* Time in jiffies before concluding the transmitter is hung */
 #define TX_TIMEOUT             (5*HZ)
@@ -77,6 +83,8 @@ MODULE_AUTHOR("Eliezer Tamir");
 MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710/57711/57711E Driver");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_MODULE_VERSION);
+MODULE_FIRMWARE(FW_FILE_NAME_E1);
+MODULE_FIRMWARE(FW_FILE_NAME_E1H);
 
 static int multi_mode = 1;
 module_param(multi_mode, int, 0);
@@ -11830,21 +11838,14 @@ static inline void be16_to_cpu_n(const u
 
 static int __devinit bnx2x_init_firmware(struct bnx2x *bp, struct device *dev)
 {
-       char fw_file_name[40] = {0};
+       const char *fw_file_name;
        struct bnx2x_fw_file_hdr *fw_hdr;
-       int rc, offset;
+       int rc;
 
-       /* Create a FW file name */
        if (CHIP_IS_E1(bp))
-               offset = sprintf(fw_file_name, FW_FILE_PREFIX_E1);
+               fw_file_name = FW_FILE_NAME_E1;
        else
-               offset = sprintf(fw_file_name, FW_FILE_PREFIX_E1H);
-
-       sprintf(fw_file_name + offset, "%d.%d.%d.%d.fw",
-               BCM_5710_FW_MAJOR_VERSION,
-               BCM_5710_FW_MINOR_VERSION,
-               BCM_5710_FW_REVISION_VERSION,
-               BCM_5710_FW_ENGINEERING_VERSION);
+               fw_file_name = FW_FILE_NAME_E1H;
 
        printk(KERN_INFO PFX "Loading %s\n", fw_file_name);
 


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/cxgb3-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/bnx2x-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/myri10ge-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/kconfig-avoid-buffer-underrun-in-choice-input.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/staging-rtl8192su-fix-procfs-code-for-interfaces-not.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/netx-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/staging-rtl8192su-clean-up-in-case-of-an-error-in-mo.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/pcnet-cs-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/spider-net-declare-module_firmware.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/tms380tr-declare-module_firmware.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to