From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Subject: [PATCH net-next 3/7] qlcnic: Add code to tune FW dump
Date: Thu, 16 Jun 2011 13:37:34 -0700 [thread overview]
Message-ID: <1308256659-19895-3-git-send-email-anirban.chakraborty@qlogic.com> (raw)
In-Reply-To: <1308256659-19895-1-git-send-email-anirban.chakraborty@qlogic.com>
To accommodate change in FW dump template, it is required to modify the
FW dump routine that captures cache data. Also, the default mask is changed
to capture a dump that would cover all the protocols that this FW supports.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
drivers/net/qlcnic/qlcnic.h | 5 ++---
drivers/net/qlcnic/qlcnic_hw.c | 14 +++++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 194376e..e5bb332 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -1220,8 +1220,7 @@ struct __ctrl {
struct __cache {
__le32 addr;
- u8 stride;
- u8 rsvd;
+ __le16 stride;
__le16 init_tag_val;
__le32 size;
__le32 no_ops;
@@ -1319,7 +1318,7 @@ enum op_codes {
#define QLCNIC_DUMP_SKIP BIT_7
#define QLCNIC_DUMP_MASK_MIN 3
-#define QLCNIC_DUMP_MASK_DEF 0x0f
+#define QLCNIC_DUMP_MASK_DEF 0x7f
#define QLCNIC_DUMP_MASK_MAX 0xff
#define QLCNIC_FORCE_FW_DUMP_KEY 0xdeadfeed
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index a5d9fbf..a4bcb87 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -1509,18 +1509,26 @@ qlcnic_dump_l2_cache(struct qlcnic_adapter *adapter,
for (i = 0; i < l2->no_ops; i++) {
QLCNIC_WR_DUMP_REG(l2->addr, base, val);
- do {
+ if (LSW(l2->ctrl_val))
QLCNIC_WR_DUMP_REG(l2->ctrl_addr, base,
LSW(l2->ctrl_val));
+ if (!poll_mask)
+ goto skip_poll;
+ do {
QLCNIC_RD_DUMP_REG(l2->ctrl_addr, base, &data);
if (!(data & poll_mask))
break;
msleep(1);
time_out++;
} while (time_out <= poll_to);
- if (time_out > poll_to)
- return -EINVAL;
+ if (time_out > poll_to) {
+ dev_err(&adapter->pdev->dev,
+ "Timeout exceeded in %s, aborting dump\n",
+ __func__);
+ return -EINVAL;
+ }
+skip_poll:
addr = l2->read_addr;
cnt = l2->read_addr_num;
while (cnt) {
--
1.7.4.1
next prev parent reply other threads:[~2011-06-16 20:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 20:37 [PATCH net-next 1/7] qlcnic: Add capability to take FW dump deterministically Anirban Chakraborty
2011-06-16 20:37 ` [PATCH net-next 2/7] qlcnic: Remove holding api lock while taking the dump Anirban Chakraborty
2011-06-16 20:37 ` Anirban Chakraborty [this message]
2011-06-16 20:37 ` [PATCH net-next 4/7] qlcnic: fix initial number of msix entries in adapter Anirban Chakraborty
2011-06-16 20:37 ` [PATCH net-next 5/7] qlcnic: fix default operating state of interface Anirban Chakraborty
2011-06-17 4:10 ` David Miller
2011-06-17 19:00 ` Stephen Hemminger
2011-06-22 7:01 ` Amit Salecha
2011-06-20 4:14 ` Anirban Chakraborty
2011-06-16 20:37 ` [PATCH net-next 6/7] qlcnic: Add support to enable/disable FW dump capability Anirban Chakraborty
2011-06-16 20:37 ` [PATCH net-next 7/7] qlcnic: multi protocol internal loopback support added Anirban Chakraborty
2011-06-16 20:37 ` [PATCH net-next 0/7] qlcnic: Misc. fixes and loopback support Anirban Chakraborty
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=1308256659-19895-3-git-send-email-anirban.chakraborty@qlogic.com \
--to=anirban.chakraborty@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.