diff options
author | Michael Chan <mchan@broadcom.com> | 2007-12-12 14:18:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:30 -0500 |
commit | 110d0ef9907b519fed1607c73b3ae883f270561e (patch) | |
tree | 7f809c40922aeb78a0e5ff8e8d52abc19c25303d /drivers/net/bnx2.c | |
parent | 5d5d001504b4a415a008f7ac1adb9fbec1637811 (diff) |
[BNX2]: Update firmware to support S/G RX buffers.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 81971b16cb83..db3b7503bb16 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include "bnx2_fw.h" | 52 | #include "bnx2_fw.h" |
53 | #include "bnx2_fw2.h" | 53 | #include "bnx2_fw2.h" |
54 | 54 | ||
55 | #define FW_BUF_SIZE 0x8000 | 55 | #define FW_BUF_SIZE 0x10000 |
56 | 56 | ||
57 | #define DRV_MODULE_NAME "bnx2" | 57 | #define DRV_MODULE_NAME "bnx2" |
58 | #define PFX DRV_MODULE_NAME ": " | 58 | #define PFX DRV_MODULE_NAME ": " |
@@ -2900,20 +2900,34 @@ bnx2_init_cpus(struct bnx2 *bp) | |||
2900 | { | 2900 | { |
2901 | struct cpu_reg cpu_reg; | 2901 | struct cpu_reg cpu_reg; |
2902 | struct fw_info *fw; | 2902 | struct fw_info *fw; |
2903 | int rc; | 2903 | int rc, rv2p_len; |
2904 | void *text; | 2904 | void *text, *rv2p; |
2905 | 2905 | ||
2906 | /* Initialize the RV2P processor. */ | 2906 | /* Initialize the RV2P processor. */ |
2907 | text = vmalloc(FW_BUF_SIZE); | 2907 | text = vmalloc(FW_BUF_SIZE); |
2908 | if (!text) | 2908 | if (!text) |
2909 | return -ENOMEM; | 2909 | return -ENOMEM; |
2910 | rc = zlib_inflate_blob(text, FW_BUF_SIZE, bnx2_rv2p_proc1, sizeof(bnx2_rv2p_proc1)); | 2910 | if (CHIP_NUM(bp) == CHIP_NUM_5709) { |
2911 | rv2p = bnx2_xi_rv2p_proc1; | ||
2912 | rv2p_len = sizeof(bnx2_xi_rv2p_proc1); | ||
2913 | } else { | ||
2914 | rv2p = bnx2_rv2p_proc1; | ||
2915 | rv2p_len = sizeof(bnx2_rv2p_proc1); | ||
2916 | } | ||
2917 | rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len); | ||
2911 | if (rc < 0) | 2918 | if (rc < 0) |
2912 | goto init_cpu_err; | 2919 | goto init_cpu_err; |
2913 | 2920 | ||
2914 | load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1); | 2921 | load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1); |
2915 | 2922 | ||
2916 | rc = zlib_inflate_blob(text, FW_BUF_SIZE, bnx2_rv2p_proc2, sizeof(bnx2_rv2p_proc2)); | 2923 | if (CHIP_NUM(bp) == CHIP_NUM_5709) { |
2924 | rv2p = bnx2_xi_rv2p_proc2; | ||
2925 | rv2p_len = sizeof(bnx2_xi_rv2p_proc2); | ||
2926 | } else { | ||
2927 | rv2p = bnx2_rv2p_proc2; | ||
2928 | rv2p_len = sizeof(bnx2_rv2p_proc2); | ||
2929 | } | ||
2930 | rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len); | ||
2917 | if (rc < 0) | 2931 | if (rc < 0) |
2918 | goto init_cpu_err; | 2932 | goto init_cpu_err; |
2919 | 2933 | ||
@@ -3029,14 +3043,14 @@ bnx2_init_cpus(struct bnx2 *bp) | |||
3029 | cpu_reg.spad_base = BNX2_CP_SCRATCH; | 3043 | cpu_reg.spad_base = BNX2_CP_SCRATCH; |
3030 | cpu_reg.mips_view_base = 0x8000000; | 3044 | cpu_reg.mips_view_base = 0x8000000; |
3031 | 3045 | ||
3032 | if (CHIP_NUM(bp) == CHIP_NUM_5709) { | 3046 | if (CHIP_NUM(bp) == CHIP_NUM_5709) |
3033 | fw = &bnx2_cp_fw_09; | 3047 | fw = &bnx2_cp_fw_09; |
3048 | else | ||
3049 | fw = &bnx2_cp_fw_06; | ||
3050 | |||
3051 | fw->text = text; | ||
3052 | rc = load_cpu_fw(bp, &cpu_reg, fw); | ||
3034 | 3053 | ||
3035 | fw->text = text; | ||
3036 | rc = load_cpu_fw(bp, &cpu_reg, fw); | ||
3037 | if (rc) | ||
3038 | goto init_cpu_err; | ||
3039 | } | ||
3040 | init_cpu_err: | 3054 | init_cpu_err: |
3041 | vfree(text); | 3055 | vfree(text); |
3042 | return rc; | 3056 | return rc; |