diff options
author | Sritej Velaga <sritej.velaga@qlogic.com> | 2011-04-01 14:28:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-06 12:47:13 -0700 |
commit | f8d54811cb125094769704722e4eda6610339b92 (patch) | |
tree | 1c562a24bb1e091722edce0a84152f29402b2369 /drivers/net/qlcnic/qlcnic_init.c | |
parent | 8816d0099b9c0f48452b69471c2f54037f7e0e3b (diff) |
qlcnic: Use flt method to determine flash fw region
Use flash layout table to get flash fw starting address and its size.
If that fails, use legacy method.
Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 74ec96da176..4ec0eeb6bff 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -1130,9 +1130,20 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter) } else { u64 data; u32 hi, lo; - - size = (QLCNIC_IMAGE_START - QLCNIC_BOOTLD_START) / 8; - flashaddr = QLCNIC_BOOTLD_START; + int ret; + struct qlcnic_flt_entry bootld_entry; + + ret = qlcnic_get_flt_entry(adapter, QLCNIC_BOOTLD_REGION, + &bootld_entry); + if (!ret) { + size = bootld_entry.size / 8; + flashaddr = bootld_entry.start_addr; + } else { + size = (QLCNIC_IMAGE_START - QLCNIC_BOOTLD_START) / 8; + flashaddr = QLCNIC_BOOTLD_START; + dev_info(&pdev->dev, + "using legacy method to get flash fw region"); + } for (i = 0; i < size; i++) { if (qlcnic_rom_fast_read(adapter, |