Commit a2050c7e authored by Sritej Velaga's avatar Sritej Velaga Committed by David S. Miller

qlcnic: Add FLT entry for CO cards FW image region

The FLT entry for FW image region has changed for C0 cards.
Updated the driver to look at the right region in the FLT.
Signed-off-by: default avatarSritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: default avatarSony Chacko <sony.chacko@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df3cfbe3
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
(sizeof(struct cmd_desc_type0) * tx_ring->num_desc) (sizeof(struct cmd_desc_type0) * tx_ring->num_desc)
#define QLCNIC_P3P_A0 0x50 #define QLCNIC_P3P_A0 0x50
#define QLCNIC_P3P_C0 0x58
#define QLCNIC_IS_REVISION_P3P(REVISION) (REVISION >= QLCNIC_P3P_A0) #define QLCNIC_IS_REVISION_P3P(REVISION) (REVISION >= QLCNIC_P3P_A0)
...@@ -291,7 +292,8 @@ struct uni_data_desc{ ...@@ -291,7 +292,8 @@ struct uni_data_desc{
/* Flash Defines and Structures */ /* Flash Defines and Structures */
#define QLCNIC_FLT_LOCATION 0x3F1000 #define QLCNIC_FLT_LOCATION 0x3F1000
#define QLCNIC_FW_IMAGE_REGION 0x74 #define QLCNIC_B0_FW_IMAGE_REGION 0x74
#define QLCNIC_C0_FW_IMAGE_REGION 0x97
#define QLCNIC_BOOTLD_REGION 0X72 #define QLCNIC_BOOTLD_REGION 0X72
struct qlcnic_flt_header { struct qlcnic_flt_header {
u16 version; u16 version;
......
...@@ -686,7 +686,13 @@ qlcnic_check_flash_fw_ver(struct qlcnic_adapter *adapter) ...@@ -686,7 +686,13 @@ qlcnic_check_flash_fw_ver(struct qlcnic_adapter *adapter)
u32 ver = -1, min_ver; u32 ver = -1, min_ver;
int ret; int ret;
ret = qlcnic_get_flt_entry(adapter, QLCNIC_FW_IMAGE_REGION, &fw_entry); if (adapter->ahw->revision_id == QLCNIC_P3P_C0)
ret = qlcnic_get_flt_entry(adapter, QLCNIC_C0_FW_IMAGE_REGION,
&fw_entry);
else
ret = qlcnic_get_flt_entry(adapter, QLCNIC_B0_FW_IMAGE_REGION,
&fw_entry);
if (!ret) if (!ret)
/* 0-4:-signature, 4-8:-fw version */ /* 0-4:-signature, 4-8:-fw version */
qlcnic_rom_fast_read(adapter, fw_entry.start_addr + 4, qlcnic_rom_fast_read(adapter, fw_entry.start_addr + 4,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment