From patchwork Tue Sep 13 18:06:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirban Chakraborty X-Patchwork-Id: 114542 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3AC7EB71CA for ; Wed, 14 Sep 2011 04:18:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932230Ab1IMSSA (ORCPT ); Tue, 13 Sep 2011 14:18:00 -0400 Received: from ch1ehsobe002.messaging.microsoft.com ([216.32.181.182]:11027 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932101Ab1IMSR6 (ORCPT ); Tue, 13 Sep 2011 14:17:58 -0400 Received: from mail20-ch1-R.bigfish.com (216.32.181.168) by CH1EHSOBE014.bigfish.com (10.43.70.64) with Microsoft SMTP Server id 14.1.225.22; Tue, 13 Sep 2011 18:17:58 +0000 Received: from mail20-ch1 (localhost.localdomain [127.0.0.1]) by mail20-ch1-R.bigfish.com (Postfix) with ESMTP id EAF201778444; Tue, 13 Sep 2011 18:17:57 +0000 (UTC) X-SpamScore: 0 X-BigFish: VPS0(zzzz1202hzz8275bhz2fh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:198.70.193.61; KIP:(null); UIP:(null); IPVD:NLI; H:avexcashub1.qlogic.com; RD:avexcashub1.qlogic.com; EFVD:NLI Received-SPF: pass (mail20-ch1: domain of qlogic.com designates 198.70.193.61 as permitted sender) client-ip=198.70.193.61; envelope-from=anirban.chakraborty@qlogic.com; helo=avexcashub1.qlogic.com ; 1.qlogic.com ; Received: from mail20-ch1 (localhost.localdomain [127.0.0.1]) by mail20-ch1 (MessageSwitch) id 1315937827738190_23098; Tue, 13 Sep 2011 18:17:07 +0000 (UTC) Received: from CH1EHSMHS004.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.249]) by mail20-ch1.bigfish.com (Postfix) with ESMTP id C4386C1030A; Tue, 13 Sep 2011 18:16:58 +0000 (UTC) Received: from avexcashub1.qlogic.com (198.70.193.61) by CH1EHSMHS004.bigfish.com (10.43.70.4) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 13 Sep 2011 18:16:57 +0000 Received: from mx.mv.qlogic.com (10.29.3.18) by avexcashub1.qlc.com (10.1.4.161) with Microsoft SMTP Server id 8.3.192.1; Tue, 13 Sep 2011 11:16:56 -0700 Received: from lnxdev-sm-001.mv.qlogic.com (dut6217.mv.qlogic.com [172.29.56.217]) by mx.mv.qlogic.com (Postfix) with ESMTP id 656871A60D; Tue, 13 Sep 2011 11:16:56 -0700 (PDT) Received: by lnxdev-sm-001.mv.qlogic.com (Postfix, from userid 0) id 5EB1014A98C; Tue, 13 Sep 2011 11:06:19 -0700 (PDT) From: Anirban Chakraborty To: David Miller CC: netdev , Dept_NX_Linux_NIC_Driver , Ameen Rahman Subject: [PATCH net-next 1/2] qlcnic: Added error logging for firmware abort Date: Tue, 13 Sep 2011 11:06:17 -0700 Message-ID: <1315937179-22383-1-git-send-email-anirban.chakraborty@qlogic.com> X-Mailer: git-send-email 1.6.0.2 MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ameen Rahman Signed-off-by: Ameen Rahman Signed-off-by: Anirban Chakraborty --- 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;