mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-10 08:33:14 +00:00
[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>
This commit is contained in:
parent
5d5d001504
commit
110d0ef990
3 changed files with 8889 additions and 6601 deletions
|
@ -52,7 +52,7 @@
|
||||||
#include "bnx2_fw.h"
|
#include "bnx2_fw.h"
|
||||||
#include "bnx2_fw2.h"
|
#include "bnx2_fw2.h"
|
||||||
|
|
||||||
#define FW_BUF_SIZE 0x8000
|
#define FW_BUF_SIZE 0x10000
|
||||||
|
|
||||||
#define DRV_MODULE_NAME "bnx2"
|
#define DRV_MODULE_NAME "bnx2"
|
||||||
#define PFX DRV_MODULE_NAME ": "
|
#define PFX DRV_MODULE_NAME ": "
|
||||||
|
@ -2900,20 +2900,34 @@ bnx2_init_cpus(struct bnx2 *bp)
|
||||||
{
|
{
|
||||||
struct cpu_reg cpu_reg;
|
struct cpu_reg cpu_reg;
|
||||||
struct fw_info *fw;
|
struct fw_info *fw;
|
||||||
int rc;
|
int rc, rv2p_len;
|
||||||
void *text;
|
void *text, *rv2p;
|
||||||
|
|
||||||
/* Initialize the RV2P processor. */
|
/* Initialize the RV2P processor. */
|
||||||
text = vmalloc(FW_BUF_SIZE);
|
text = vmalloc(FW_BUF_SIZE);
|
||||||
if (!text)
|
if (!text)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
rc = zlib_inflate_blob(text, FW_BUF_SIZE, bnx2_rv2p_proc1, sizeof(bnx2_rv2p_proc1));
|
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
|
||||||
|
rv2p = bnx2_xi_rv2p_proc1;
|
||||||
|
rv2p_len = sizeof(bnx2_xi_rv2p_proc1);
|
||||||
|
} else {
|
||||||
|
rv2p = bnx2_rv2p_proc1;
|
||||||
|
rv2p_len = sizeof(bnx2_rv2p_proc1);
|
||||||
|
}
|
||||||
|
rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto init_cpu_err;
|
goto init_cpu_err;
|
||||||
|
|
||||||
load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1);
|
load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1);
|
||||||
|
|
||||||
rc = zlib_inflate_blob(text, FW_BUF_SIZE, bnx2_rv2p_proc2, sizeof(bnx2_rv2p_proc2));
|
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
|
||||||
|
rv2p = bnx2_xi_rv2p_proc2;
|
||||||
|
rv2p_len = sizeof(bnx2_xi_rv2p_proc2);
|
||||||
|
} else {
|
||||||
|
rv2p = bnx2_rv2p_proc2;
|
||||||
|
rv2p_len = sizeof(bnx2_rv2p_proc2);
|
||||||
|
}
|
||||||
|
rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto init_cpu_err;
|
goto init_cpu_err;
|
||||||
|
|
||||||
|
@ -3029,14 +3043,14 @@ bnx2_init_cpus(struct bnx2 *bp)
|
||||||
cpu_reg.spad_base = BNX2_CP_SCRATCH;
|
cpu_reg.spad_base = BNX2_CP_SCRATCH;
|
||||||
cpu_reg.mips_view_base = 0x8000000;
|
cpu_reg.mips_view_base = 0x8000000;
|
||||||
|
|
||||||
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
|
if (CHIP_NUM(bp) == CHIP_NUM_5709)
|
||||||
fw = &bnx2_cp_fw_09;
|
fw = &bnx2_cp_fw_09;
|
||||||
|
else
|
||||||
|
fw = &bnx2_cp_fw_06;
|
||||||
|
|
||||||
|
fw->text = text;
|
||||||
|
rc = load_cpu_fw(bp, &cpu_reg, fw);
|
||||||
|
|
||||||
fw->text = text;
|
|
||||||
rc = load_cpu_fw(bp, &cpu_reg, fw);
|
|
||||||
if (rc)
|
|
||||||
goto init_cpu_err;
|
|
||||||
}
|
|
||||||
init_cpu_err:
|
init_cpu_err:
|
||||||
vfree(text);
|
vfree(text);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue