aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-09-16 15:14:42 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-17 14:30:55 -0400
commit97f29d8236aa3612986e7e7179282ff460eba686 (patch)
treeee52b9fcd66933147f5af797a4072775fa662fb2 /drivers/net/qlcnic
parentaec1e8452dc364cffd0333e5632ec482f6322593 (diff)
qlcnic: remove fw version check
Don't compare flash and file fw version. Allow to load old fw from file than flashed fw. If file fw is present, don't skip fw re-intialization. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 9f994b968f4a..e26fa9593311 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1015,8 +1015,6 @@ qlcnic_check_fw_hearbeat(struct qlcnic_adapter *adapter)
1015int 1015int
1016qlcnic_need_fw_reset(struct qlcnic_adapter *adapter) 1016qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
1017{ 1017{
1018 u32 val, version, major, minor, build;
1019
1020 if (qlcnic_check_fw_hearbeat(adapter)) { 1018 if (qlcnic_check_fw_hearbeat(adapter)) {
1021 qlcnic_rom_lock_recovery(adapter); 1019 qlcnic_rom_lock_recovery(adapter);
1022 return 1; 1020 return 1;
@@ -1025,20 +1023,8 @@ qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
1025 if (adapter->need_fw_reset) 1023 if (adapter->need_fw_reset)
1026 return 1; 1024 return 1;
1027 1025
1028 /* check if we have got newer or different file firmware */ 1026 if (adapter->fw)
1029 if (adapter->fw) { 1027 return 1;
1030
1031 val = qlcnic_get_fw_version(adapter);
1032
1033 version = QLCNIC_DECODE_VERSION(val);
1034
1035 major = QLCRD32(adapter, QLCNIC_FW_VERSION_MAJOR);
1036 minor = QLCRD32(adapter, QLCNIC_FW_VERSION_MINOR);
1037 build = QLCRD32(adapter, QLCNIC_FW_VERSION_SUB);
1038
1039 if (version > QLCNIC_VERSION_CODE(major, minor, build))
1040 return 1;
1041 }
1042 1028
1043 return 0; 1029 return 0;
1044} 1030}
@@ -1174,18 +1160,6 @@ qlcnic_validate_firmware(struct qlcnic_adapter *adapter)
1174 return -EINVAL; 1160 return -EINVAL;
1175 } 1161 }
1176 1162
1177 /* check if flashed firmware is newer */
1178 if (qlcnic_rom_fast_read(adapter,
1179 QLCNIC_FW_VERSION_OFFSET, (int *)&val))
1180 return -EIO;
1181
1182 val = QLCNIC_DECODE_VERSION(val);
1183 if (val > ver) {
1184 dev_info(&pdev->dev, "%s: firmware is older than flash\n",
1185 fw_name[fw_type]);
1186 return -EINVAL;
1187 }
1188
1189 QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC); 1163 QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC);
1190 return 0; 1164 return 0;
1191} 1165}