From 99c662c7250e7c4c300e4e798a68bbff217d7604 Mon Sep 17 00:00:00 2001 From: lxoliva Date: Mon, 16 Feb 2009 04:17:18 +0000 Subject: [PATCH] Revamped bnx2 and bnx2x. git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4729 559672b5-ba27-0410-b829-e8f1faed8b1b --- deblob-2.6.28 | 29 ++++++++++++++++++----------- deblob-check | 18 +++++++++++++----- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/deblob-2.6.28 b/deblob-2.6.28 index 651a453571c..d560097abdd 100755 --- a/deblob-2.6.28 +++ b/deblob-2.6.28 @@ -53,7 +53,7 @@ esac check=`echo $0 | sed 's,/[^/]*$,,'`/deblob-check if [ ! -f $check ] ; then - echo optional deblob-check missing, will remove entire files >&2 + die deblob-check script missing, will remove entire files have_check=false else have_check=: @@ -482,14 +482,25 @@ clean_blob drivers/net/starfire.c clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE' clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile -# BNX2 - Broadcom NetXtremeII -clean_blob drivers/net/bnx2_fw.h -clean_blob drivers/net/bnx2_fw2.h +announce BNX2 - Broadcom NetXtremeII +clean_file drivers/net/bnx2_fw.h +clean_file drivers/net/bnx2_fw2.h +clean_sed '/ bnx2_init_cpus(/i\ + printk (KERN_ERR "%s: Missing Free firmware\\n", bp->dev->name);\ + return -EINVAL;\ +#define bnx2_init_cpus(bp) (-EINVAL)' drivers/net/bnx2.c +clean_blob drivers/net/bnx2.c clean_kconfig drivers/net/Kconfig 'BNX2' clean_mk CONFIG_BNX2 drivers/net/Makefile -# BNX2X - Broadcom NetXtremeII 10Gb support +announce BNX2X - Broadcom NetXtremeII 10Gb support clean_blob drivers/net/bnx2x_init_values.h +clean_blob drivers/net/bnx2x_init.h +clean_sed '/^#include "bnx2x_init\.h"/,/^$/ {/^$/i\ +#define bnx2x_init_block(bp, start, end) \\\ + return printk(KERN_ERR PFX "%s: Missing Free firmware\\n", bp->dev->name),\ + -EINVAL; +}' drivers/net/bnx2x_main.c clean_kconfig drivers/net/Kconfig 'BNX2X' clean_mk CONFIG_BNX2X drivers/net/Makefile @@ -500,12 +511,8 @@ clean_mk CONFIG_CASSINI drivers/net/Makefile # CHELSIO_T3 - Chelsio AEL 2005 support clean_blob drivers/net/cxgb3/ael1002.c -if $have_check; then - : -else - clean_kconfig drivers/net/Kconfig 'CHELSIO_T3' - clean_mk CONFIG_CHELSIO_T3 drivers/net/cxgb3/Makefile -fi +clean_kconfig drivers/net/Kconfig 'CHELSIO_T3' +clean_mk CONFIG_CHELSIO_T3 drivers/net/cxgb3/Makefile # E100 - Intel(R) PRO/100+ clean_blob drivers/net/e100.c diff --git a/deblob-check b/deblob-check index b8ea7e8bbd5..af46bd2d820 100755 --- a/deblob-check +++ b/deblob-check @@ -1,6 +1,6 @@ #! /bin/sh -# deblob-check version 2009-02-12 +# deblob-check version 2009-02-15 # Inspired in gNewSense's find-firmware script. # Written by Alexandre Oliva @@ -939,6 +939,15 @@ set_except () { blobna '\(agere\|prism\)_\(sta\|ap\)_fw\.bin' drivers/net/wireless/orinoco.c blobna 'symbol_sp24t_\(prim\|sec\)_fw' drivers/net/wireless/orinoco.c + blob 'static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\([\n][\n]*static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\)*' 'drivers/net/bnx2_fw2\?.h' + blob '#include "bnx2_fw2\?\.h"\([\n][\n]*#include "bnx2_fw2\?\.h"\)*' drivers/net/bnx2.c + blob 'static int[\n]bnx2_init_cpus([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}' drivers/net/bnx2.c + + # init_data_e1h? might actually be just data, but it doesn't + # really matter. + blob 'static const u32 \(init\?\|[tucx]sem_\(int_table\|pram\)\)_data_e1h\?\[\] = {[^}]*};\([\n][\n]*static const u32 \(init\?\|[tucx]sem_\(int_table\|pram\)\)_data_e1h\?\[\] = {[^}]*};\)*' drivers/net/bnx2x_init_values.h + blob 'static \(void \|const u32 \*\)bnx2x_\(sel_blob\|init_wr_wb\|init_block\)([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}\([\n][\n]*static \(void \|const u32 \*\)bnx2x_\(sel_blob\|init_wr_wb\|init_block\)([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}\)*' drivers/net/bnx2x_init.h + # This looks suspicious, but it pretty much just sets stuff to zero. initnc 'static __u8 mode8420\(pro\|con\)\[\] =' drivers/media/video/cs8420.h @@ -1018,13 +1027,13 @@ set_except () { initnc ' static unsigned char static_pad\[\] =' initnc ' static unsigned char table_alaw2ulaw\[\] =' initnc ' static unsigned char table_ulaw2alaw\[\] =' - initnc ' u32 reg_boundaries\[\] =' + defsnc ' u32 reg_boundaries\[\] =' drivers/net/bnx2.c initnc ' u8 b\[\] =' initnc ' uint8_t tx\[\] =' initnc ' unsigned char saa7111_regs\[\] =' initnc ' unsigned char sas_pcd_m_pg\[\] =' initnc ' } modedb\[5\] =' - initnc ' } reg_tbl\[\] =' + defsnc ' } reg_tbl\[\] =' drivers/net/bnx2.c initnc ' } vals\[\] =' initnc ' } vm_devices\[\] =' initnc ' static const code distfix\[32\] =' @@ -1201,8 +1210,7 @@ set_except () { initnc 'static u32 v_gain\[64\] =' initnc 'static u8 SRAM_Table\[\]\[60\] =' initnc 'static u8 alps_tdee4_stv0297_inittab\[\] =' - initnc 'static u8 bnx2_5706_stats_len_arr\[BNX2_NUM_STATS\] =' - initnc 'static u8 bnx2_5708_stats_len_arr\[BNX2_NUM_STATS\] =' + defsnc 'static u8 bnx2_570[68]_stats_len_arr\[BNX2_NUM_STATS\] =' drivers/net/bnx2.c initnc 'static u8 flit_desc_map\[\] =' defsnc 'static u8 init_tab \?\[\] =' 'drivers/media/dvb/frontends/cx2270\(0\|2\)\.c' initnc 'static u8 mac_reader\[\] =' -- 2.31.1