[PATCHv2 NEXT 4/5] qlcnic: remove fw version check

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Amit Kumar Salecha
Date: Thursday, September 16, 2010 - 10:14 pm

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>
---
 drivers/net/qlcnic/qlcnic_init.c |   30 ++----------------------------
 1 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 9f994b9..e26fa95 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)
 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;
 }
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv2 NEXT 0/5]qlcnic: vlan rx accleration support, Amit Kumar Salecha, (Thu Sep 16, 10:14 pm)
[PATCHv2 NEXT 1/5] qlcnic: support vlan rx accleration, Amit Kumar Salecha, (Thu Sep 16, 10:14 pm)
[PATCHv2 NEXT 4/5] qlcnic: remove fw version check, Amit Kumar Salecha, (Thu Sep 16, 10:14 pm)
[PATCHv2 NEXT 5/5] qlcnic: update version 5.0.10, Amit Kumar Salecha, (Thu Sep 16, 10:14 pm)
[PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Eric Dumazet, (Fri Sep 17, 2:57 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Amit Salecha, (Fri Sep 17, 3:53 am)
Re: [PATCHv2 NEXT 0/5]qlcnic: vlan rx accleration support, David Miller, (Fri Sep 17, 11:31 am)
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, David Miller, (Fri Sep 17, 10:58 pm)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Amit Salecha, (Mon Sep 20, 4:16 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Eric Dumazet, (Mon Sep 20, 5:18 am)
[PATCH net-next-2.6] qlnic: dont set skb-&gt;truesize, Eric Dumazet, (Mon Sep 20, 5:28 am)
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, David Miller, (Mon Sep 20, 8:58 am)
Re: [PATCH net-next-2.6] qlnic: dont set skb-&gt;truesize, David Miller, (Mon Sep 20, 10:09 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Amit Salecha, (Tue Sep 21, 1:19 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Eric Dumazet, (Tue Sep 21, 1:34 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Amit Salecha, (Tue Sep 21, 1:41 am)
RE: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, Eric Dumazet, (Tue Sep 21, 2:23 am)
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2, David Miller, (Tue Sep 21, 12:33 pm)
[PATCH] netxen: dont set skb-&gt;truesize, Eric Dumazet, (Tue Sep 21, 12:55 pm)
Re: [PATCH] netxen: dont set skb-&gt;truesize, David Miller, (Tue Sep 21, 1:04 pm)