netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Dept_NX_Linux_NIC_Driver@qlogic.com,
	Sony Chacko <sony.chacko@qlogic.com>
Subject: [PATCH net-next 6/9] qlcnic: Fix recurring firmware dump collection
Date: Sat, 13 Apr 2013 13:28:31 -0400	[thread overview]
Message-ID: <1365874114-6759-7-git-send-email-shahed.shaikh@qlogic.com> (raw)
In-Reply-To: <1365874114-6759-1-git-send-email-shahed.shaikh@qlogic.com>

From: Sony Chacko <sony.chacko@qlogic.com>

Firmware dump is collected after a non-recoverable Tx timeout error.
Reset dump collection flag and context reset flag in virtual NIC
mode to prevent recurring dump collection and context resets.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c  |    3 +++
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c   |   11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index c302d11..ad3ac82 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -641,6 +641,7 @@ static void qlcnic_83xx_idc_update_idc_params(struct qlcnic_adapter *adapter)
 	adapter->ahw->idc.delay = QLC_83XX_IDC_FW_POLL_DELAY;
 	adapter->ahw->idc.err_code = 0;
 	adapter->ahw->idc.collect_dump = 0;
+	adapter->ahw->reset_context = 0;
 }
 
 /**
@@ -691,6 +692,8 @@ int qlcnic_83xx_idc_vnic_pf_entry(struct qlcnic_adapter *adapter)
 	/* Privileged function waits till mgmt function enables VNIC mode */
 	state = QLCRDX(adapter->ahw, QLC_83XX_VNIC_STATE);
 	if (state != QLCNIC_DEV_NPAR_OPER) {
+		adapter->ahw->idc.collect_dump = 0;
+		adapter->ahw->reset_context = 0;
 		if (!ahw->idc.vnic_wait_limit--) {
 			qlcnic_83xx_idc_enter_failed_state(adapter, 1);
 			return -EIO;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index e0598cc..2a72c4f 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2378,10 +2378,15 @@ static void qlcnic_tx_timeout(struct net_device *netdev)
 
 	dev_err(&netdev->dev, "transmit timeout, resetting.\n");
 
-	if (++adapter->tx_timeo_cnt >= QLCNIC_MAX_TX_TIMEOUTS)
-		adapter->need_fw_reset = 1;
-	else
+	if (++adapter->tx_timeo_cnt >= QLCNIC_MAX_TX_TIMEOUTS) {
+		if (qlcnic_82xx_check(adapter))
+			adapter->need_fw_reset = 1;
+		else if (qlcnic_83xx_check(adapter))
+			qlcnic_dev_request_reset(adapter,
+						 QLCNIC_FORCE_FW_DUMP_KEY);
+	} else {
 		adapter->ahw->reset_context = 1;
+	}
 }
 
 static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev)
-- 
1.5.6

  parent reply	other threads:[~2013-04-13 17:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 17:28 [PATCH net-next 0/9] qlcnic: Bug fixes and enhancements Shahed Shaikh
2013-04-13 17:28 ` [PATCH net-next 1/9] qlcnic: Implement GET_LED_STATUS command for 82xx adapter Shahed Shaikh
2013-04-14 10:55   ` Francois Romieu
2013-04-13 17:28 ` [PATCH net-next 2/9] qlcnic: Fix typo in logs Shahed Shaikh
2013-04-13 17:28 ` [PATCH net-next 3/9] qlcnic: Add identifying string for 83xx adapter Shahed Shaikh
2013-04-14 10:55   ` Francois Romieu
2013-04-13 17:28 ` [PATCH net-next 4/9] qlcnic: fix beaconing test for 82xx adapter Shahed Shaikh
2013-04-14 10:55   ` Francois Romieu
2013-04-13 17:28 ` [PATCH net-next 5/9] qlcnic: Enable Interrupt Coalescing for 83xx adapter Shahed Shaikh
2013-04-14 10:55   ` Francois Romieu
2013-04-13 17:28 ` Shahed Shaikh [this message]
2013-04-14 10:55   ` [PATCH net-next 6/9] qlcnic: Fix recurring firmware dump collection Francois Romieu
2013-04-13 17:28 ` [PATCH net-next 7/9] qlcnic: fix TSO race condition Shahed Shaikh
2013-04-13 18:35   ` Eric Dumazet
2013-04-14 17:55     ` Shahed Shaikh
2013-04-13 17:28 ` [PATCH net-next 8/9] qlcnic: Enhanced channel configuration logs Shahed Shaikh
2013-04-14 10:55   ` Francois Romieu
2013-04-13 17:28 ` [PATCH net-next 9/9] qlcnic: Bump up the version to 5.2.41 Shahed Shaikh

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=1365874114-6759-7-git-send-email-shahed.shaikh@qlogic.com \
    --to=shahed.shaikh@qlogic.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sony.chacko@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;
as well as URLs for NNTP newsgroup(s).