qlcnic: fix context cleanup
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Thu, 13 May 2010 03:07:42 +0000 (03:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2010 10:06:52 +0000 (03:06 -0700)
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>
drivers/net/qlcnic/qlcnic_main.c

index 0a2d714..3d90bb2 100644 (file)
@@ -2301,10 +2301,8 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
        if (qlcnic_check_temp(adapter))
                goto detach;
 
-       if (adapter->need_fw_reset) {
+       if (adapter->need_fw_reset)
                qlcnic_dev_request_reset(adapter);
-               goto detach;
-       }
 
        state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);
        if (state == QLCNIC_DEV_NEED_RESET || state == QLCNIC_DEV_NEED_QUISCENT)