qlcnic: remove fw version check
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Thu, 16 Sep 2010 19:14:42 +0000 (19:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Sep 2010 18:30:55 +0000 (11:30 -0700)
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>
drivers/net/qlcnic/qlcnic_init.c

index 9f994b968f4adb496c2ba58f7c808c7e12a28acf..e26fa9593311cf8c6dfcf03884eb2c02390b070f 100644 (file)
@@ -1015,8 +1015,6 @@ qlcnic_check_fw_hearbeat(struct qlcnic_adapter *adapter)
 int
 qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
 {
-       u32 val, version, major, minor, build;
-
        if (qlcnic_check_fw_hearbeat(adapter)) {
                qlcnic_rom_lock_recovery(adapter);
                return 1;
@@ -1025,20 +1023,8 @@ qlcnic_need_fw_reset(struct qlcnic_adapter *adapter)
        if (adapter->need_fw_reset)
                return 1;
 
-       /* check if we have got newer or different file firmware */
-       if (adapter->fw) {
-
-               val = qlcnic_get_fw_version(adapter);
-
-               version = QLCNIC_DECODE_VERSION(val);
-
-               major = QLCRD32(adapter, QLCNIC_FW_VERSION_MAJOR);
-               minor = QLCRD32(adapter, QLCNIC_FW_VERSION_MINOR);
-               build = QLCRD32(adapter, QLCNIC_FW_VERSION_SUB);
-
-               if (version > QLCNIC_VERSION_CODE(major, minor, build))
-                       return 1;
-       }
+       if (adapter->fw)
+               return 1;
 
        return 0;
 }
@@ -1174,18 +1160,6 @@ qlcnic_validate_firmware(struct qlcnic_adapter *adapter)
                return -EINVAL;
        }
 
-       /* check if flashed firmware is newer */
-       if (qlcnic_rom_fast_read(adapter,
-                       QLCNIC_FW_VERSION_OFFSET, (int *)&val))
-               return -EIO;
-
-       val = QLCNIC_DECODE_VERSION(val);
-       if (val > ver) {
-               dev_info(&pdev->dev, "%s: firmware is older than flash\n",
-                               fw_name[fw_type]);
-               return -EINVAL;
-       }
-
        QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC);
        return 0;
 }