aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_main.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-05-12 23:07:42 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-14 06:06:52 -0400
commit2372a5f1c869fd1e4dc11fb41600197fcce1121c (patch)
tree53e1960f00ce51368d4019a0321d40f26c20035b /drivers/net/qlcnic/qlcnic_main.c
parente0a67e2dd9aa01a59cd91a7b39a6af1282bbc214 (diff)
qlcnic: fix context cleanup
Before going for recovery, every pci-func should check fw state, irrespective of device state. This to avoid unnecssary sending of command for ctx destroy. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 0a2d7148f650..3d90bb2fc7db 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -2301,10 +2301,8 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
2301 if (qlcnic_check_temp(adapter)) 2301 if (qlcnic_check_temp(adapter))
2302 goto detach; 2302 goto detach;
2303 2303
2304 if (adapter->need_fw_reset) { 2304 if (adapter->need_fw_reset)
2305 qlcnic_dev_request_reset(adapter); 2305 qlcnic_dev_request_reset(adapter);
2306 goto detach;
2307 }
2308 2306
2309 state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE); 2307 state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);
2310 if (state == QLCNIC_DEV_NEED_RESET || state == QLCNIC_DEV_NEED_QUISCENT) 2308 if (state == QLCNIC_DEV_NEED_RESET || state == QLCNIC_DEV_NEED_QUISCENT)