From: Sony Chacko <sony.chacko@qlogic.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
Dept_NX_Linux_NIC_Driver <Dept_NX_Linux_NIC_Driver@qlogic.com>,
Sritej Velaga <sritej.velaga@qlogic.com>
Subject: [PATCH net-next 3/5] qlcnic: Add FLT entry for CO cards FW image region
Date: Mon, 29 Aug 2011 15:50:28 -0700 [thread overview]
Message-ID: <1314658231-30735-3-git-send-email-sony.chacko@qlogic.com> (raw)
In-Reply-To: <1314658231-30735-1-git-send-email-sony.chacko@qlogic.com>
From: Sritej Velaga <sritej.velaga@qlogic.com>
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: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 4 +++-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 8 +++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 53c6e5d..4118502 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -73,6 +73,7 @@
(sizeof(struct cmd_desc_type0) * tx_ring->num_desc)
#define QLCNIC_P3P_A0 0x50
+#define QLCNIC_P3P_C0 0x58
#define QLCNIC_IS_REVISION_P3P(REVISION) (REVISION >= QLCNIC_P3P_A0)
@@ -291,7 +292,8 @@ struct uni_data_desc{
/* Flash Defines and Structures */
#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
struct qlcnic_flt_header {
u16 version;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
index b02859c..7f4b8e6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
@@ -686,7 +686,13 @@ qlcnic_check_flash_fw_ver(struct qlcnic_adapter *adapter)
u32 ver = -1, min_ver;
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)
/* 0-4:-signature, 4-8:-fw version */
qlcnic_rom_fast_read(adapter, fw_entry.start_addr + 4,
--
1.6.0.2
next prev parent reply other threads:[~2011-08-29 23:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 22:50 [PATCH net-next 1/5] qlcnic: detect fan failure Sony Chacko
2011-08-29 22:50 ` [PATCH net-next 2/5] qlcnic: Change debug messages in loopback path Sony Chacko
2011-08-30 3:00 ` Joe Perches
2011-08-29 22:50 ` Sony Chacko [this message]
2011-08-29 22:50 ` [PATCH net-next 4/5] qlcnic: fix cdrp race condition Sony Chacko
2011-08-29 22:50 ` [PATCH net-next 5/5] qlcnic: add beacon test support Sony Chacko
2011-08-29 22:50 ` [PATCH net-next 0/5] qlcnic: Bug fixes Sony Chacko
2011-08-30 2:53 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314658231-30735-3-git-send-email-sony.chacko@qlogic.com \
--to=sony.chacko@qlogic.com \
--cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sritej.velaga@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox