Patchwork [1/5] qlcnic: skip IDC ack check in fw reset path.

login
register
mail settings
Submitter Anirban Chakraborty
Date Oct. 28, 2011, 10:57 p.m.
Message ID <1319842636-14936-1-git-send-email-anirban.chakraborty@qlogic.com>
Download mbox | patch
Permalink /patch/122509/
State Accepted
Delegated to: David Miller
Headers show

Comments

Anirban Chakraborty - Oct. 28, 2011, 10:57 p.m.
From: Sritej Velaga <sritej.velaga@qlogic.com>

In fw reset path, we should consider any change in device state as an
ack from the other driver. When that happens, we don't have to wait for
an explicit ack.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
Anirban Chakraborty - Oct. 28, 2011, 10:57 p.m.
Please apply the series to net-next. Thanks.

-Anirban


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 30, 2011, 7:10 a.m.
From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Date: Fri, 28 Oct 2011 15:57:16 -0700

> Please apply the series to net-next. Thanks.

All seem like reasonable bug fixes so applied to 'net', thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 106503f..2edffce 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2840,8 +2840,15 @@  qlcnic_fwinit_work(struct work_struct *work)
 		goto wait_npar;
 	}
 
+	if (dev_state == QLCNIC_DEV_INITIALIZING ||
+	    dev_state == QLCNIC_DEV_READY) {
+		dev_info(&adapter->pdev->dev, "Detected state change from "
+				"DEV_NEED_RESET, skipping ack check\n");
+		goto skip_ack_check;
+	}
+
 	if (adapter->fw_wait_cnt++ > adapter->reset_ack_timeo) {
-		dev_err(&adapter->pdev->dev, "Reset:Failed to get ack %d sec\n",
+		dev_info(&adapter->pdev->dev, "Reset:Failed to get ack %d sec\n",
 					adapter->reset_ack_timeo);
 		goto skip_ack_check;
 	}