From: Ron Mercer <ron.mercer@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <ron.mercer@qlogic.com>,
<jitendra.kalsaria@qlogic.com>, <ameen.rahman@qlogic.com>
Subject: [net-2.6 PATCH 1/3] qlge:Fix crash caused by mailbox execution on wedged chip.
Date: Thu, 30 Jun 2011 13:02:05 -0700 [thread overview]
Message-ID: <1309464127-14797-1-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <1308855049.6688.19.camel@Joe-Laptop>
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
When we are in a recover process from a chip fatal error,
driver should skip over execution of mailbox commands during
resetting chip.
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge.h | 1 +
drivers/net/qlge/qlge_main.c | 20 +++++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index d328507..b2c8612 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -1996,6 +1996,7 @@ enum {
QL_LB_LINK_UP = 10,
QL_FRC_COREDUMP = 11,
QL_EEH_FATAL = 12,
+ QL_ASIC_RECOVERY = 14, /* We are in ascic recovery. */
};
/* link_status bit definitions */
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 930ae45..4fbefcf 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2152,6 +2152,10 @@ void ql_queue_asic_error(struct ql_adapter *qdev)
* thread
*/
clear_bit(QL_ADAPTER_UP, &qdev->flags);
+ /* Set asic recovery bit to indicate reset process that we are
+ * in fatal error recovery process rather than normal close
+ */
+ set_bit(QL_ASIC_RECOVERY, &qdev->flags);
queue_delayed_work(qdev->workqueue, &qdev->asic_reset_work, 0);
}
@@ -3818,11 +3822,17 @@ static int ql_adapter_reset(struct ql_adapter *qdev)
end_jiffies = jiffies +
max((unsigned long)1, usecs_to_jiffies(30));
- /* Stop management traffic. */
- ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_STOP);
+ /* Check if bit is set then skip the mailbox command and
+ * clear the bit, else we are in normal reset process.
+ */
+ if (!test_bit(QL_ASIC_RECOVERY, &qdev->flags)) {
+ /* Stop management traffic. */
+ ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_STOP);
- /* Wait for the NIC and MGMNT FIFOs to empty. */
- ql_wait_fifo_empty(qdev);
+ /* Wait for the NIC and MGMNT FIFOs to empty. */
+ ql_wait_fifo_empty(qdev);
+ } else
+ clear_bit(QL_ASIC_RECOVERY, &qdev->flags);
ql_write32(qdev, RST_FO, (RST_FO_FR << 16) | RST_FO_FR);
--
1.6.0.2
next prev parent reply other threads:[~2011-06-30 20:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 17:52 [net-2.6 PATCH 1/3] qlge:Fix crash caused by mailbox execution on wedged chip Ron Mercer
2011-06-23 17:52 ` [net-2.6 PATCH 2/3] qlge:Fix printk priority so chip fatal errors are always reported Ron Mercer
2011-06-23 18:50 ` Joe Perches
2011-06-23 18:43 ` Ron Mercer
2011-06-30 20:02 ` Ron Mercer [this message]
2011-07-02 0:36 ` [net-2.6 PATCH 1/3] qlge:Fix crash caused by mailbox execution on wedged chip David Miller
2011-06-30 20:02 ` [net-2.6 PATCH 2/3] qlge: Fix printk priority so chip fatal errors are always reported Ron Mercer
2011-07-02 0:36 ` David Miller
2011-06-30 20:02 ` [net-2.6 PATCH 3/3] qlge:Version change to v1.00.00.29 Ron Mercer
2011-07-02 0:36 ` David Miller
2011-06-23 17:52 ` Ron Mercer
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=1309464127-14797-1-git-send-email-ron.mercer@qlogic.com \
--to=ron.mercer@qlogic.com \
--cc=ameen.rahman@qlogic.com \
--cc=davem@davemloft.net \
--cc=jitendra.kalsaria@qlogic.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).