netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anirban Chakraborty <anirban.chakraborty@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>,
	Ameen Rahman <ameen.rahman@qlogic.com>
Subject: [PATCH net-next 1/2] qlcnic: Added error logging for firmware abort
Date: Tue, 13 Sep 2011 11:06:17 -0700	[thread overview]
Message-ID: <1315937179-22383-1-git-send-email-anirban.chakraborty@qlogic.com> (raw)

From: Ameen Rahman <ameen.rahman@qlogic.com>

Signed-off-by: Ameen Rahman <ameen.rahman@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 690c93f..248d5fc 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -3087,7 +3087,7 @@ static int
 qlcnic_check_health(struct qlcnic_adapter *adapter)
 {
 	u32 state = 0, heartbeat;
-	struct net_device *netdev = adapter->netdev;
+	u32 peg_status;
 
 	if (qlcnic_check_temp(adapter))
 		goto detach;
@@ -3127,8 +3127,8 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
 	if (auto_fw_reset)
 		clear_bit(__QLCNIC_FW_ATTACHED, &adapter->state);
 
-	dev_info(&netdev->dev, "firmware hang detected\n");
-	dev_info(&adapter->pdev->dev, "Dumping hw/fw registers\n"
+	dev_err(&adapter->pdev->dev, "firmware hang detected\n");
+	dev_err(&adapter->pdev->dev, "Dumping hw/fw registers\n"
 			"PEG_HALT_STATUS1: 0x%x, PEG_HALT_STATUS2: 0x%x,\n"
 			"PEG_NET_0_PC: 0x%x, PEG_NET_1_PC: 0x%x,\n"
 			"PEG_NET_2_PC: 0x%x, PEG_NET_3_PC: 0x%x,\n"
@@ -3140,6 +3140,11 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
 			QLCRD32(adapter, QLCNIC_CRB_PEG_NET_2 + 0x3c),
 			QLCRD32(adapter, QLCNIC_CRB_PEG_NET_3 + 0x3c),
 			QLCRD32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x3c));
+	peg_status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1);
+	if (LSW(MSB(peg_status)) == 0x67)
+		dev_err(&adapter->pdev->dev,
+			"Firmware aborted with error code 0x00006700. "
+				"Device is being reset.\n");
 detach:
 	adapter->dev_state = (state == QLCNIC_DEV_NEED_QUISCENT) ? state :
 		QLCNIC_DEV_NEED_RESET;
-- 
1.7.4.1

             reply	other threads:[~2011-09-13 18:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 18:06 Anirban Chakraborty [this message]
2011-09-13 18:06 ` [PATCH net-next 2/2] qlcnic: Change CDRP function Anirban Chakraborty
2011-09-13 18:22   ` Joe Perches
2011-09-13 20:28     ` Anirban Chakraborty
2011-09-13 20:56       ` Joe Perches
2011-09-13 21:15         ` Anirban Chakraborty
2011-09-13 18:06 ` [PATCH net-next 0/2] qlcnic: Fixes Anirban Chakraborty
2011-09-23 18:10   ` Anirban Chakraborty
2011-09-23 18:24     ` David Miller
2011-09-23 18:29       ` 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=1315937179-22383-1-git-send-email-anirban.chakraborty@qlogic.com \
    --to=anirban.chakraborty@qlogic.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=ameen.rahman@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 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).