netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ameen.rahman@qlogic.com
Subject: [PATCH NEXT 2/5] netxen: fix corner cases of firmware recovery
Date: Mon, 29 Mar 2010 05:43:42 -0700	[thread overview]
Message-ID: <1269866625-26151-3-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1269866625-26151-1-git-send-email-amit.salecha@qlogic.com>

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

o DEV_NEED_RESET state was not handled during fw intialization phase.
o nx_decr_dev_ref_cnt() can return error, if fail to grab pcie seamphore.
---
 drivers/net/netxen/netxen_nic_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 08780ef..68903bf 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -2294,6 +2294,7 @@ netxen_fwinit_work(struct work_struct *work)
 		}
 		break;
 
+	case NX_DEV_NEED_RESET:
 	case NX_DEV_INITALIZING:
 		if (++adapter->fw_wait_cnt < FW_POLL_THRESH) {
 			netxen_schedule_work(adapter,
@@ -2337,6 +2338,9 @@ netxen_detach_work(struct work_struct *work)
 
 	ref_cnt = nx_decr_dev_ref_cnt(adapter);
 
+	if (ref_cnt == -EIO)
+		goto err_ret;
+
 	delay = (ref_cnt == 0) ? 0 : (2 * FW_POLL_DELAY);
 
 	adapter->fw_wait_cnt = 0;
-- 
1.6.0.2


  parent reply	other threads:[~2010-03-29 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 12:43 [PATCH NEXT 0/5]netxen: fw file validation and fixes Amit Kumar Salecha
2010-03-29 12:43 ` [PATCH NEXT 1/5] netxen: fix tx csum status Amit Kumar Salecha
2010-03-29 12:43 ` Amit Kumar Salecha [this message]
2010-03-29 12:43 ` [PATCH NEXT 3/5] netxen: validate unified romimage Amit Kumar Salecha
2010-03-29 12:43 ` [PATCH NEXT 4/5] netxen: fix fw load from file Amit Kumar Salecha
2010-03-29 12:43 ` [PATCH NEXT 5/5] netxen: fix interrupt for NX2031 Amit Kumar Salecha
2010-03-29 20:18 ` [PATCH NEXT 0/5]netxen: fw file validation and fixes David Miller

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=1269866625-26151-3-git-send-email-amit.salecha@qlogic.com \
    --to=amit.salecha@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).