qlcnic: Fix diagnostic interrupt test for 83xx adapters
authorManish Chopra <manish.chopra@qlogic.com>
Thu, 15 Aug 2013 12:29:29 +0000 (08:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Aug 2013 21:35:01 +0000 (14:35 -0700)
o Do not allow interrupt test when adapter is resetting.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c

index 92da9980a0a0a2b86ed2189313c7105ad693354a..9d4bb7f839041967eaed1ef6fd0fd51b40f6ec6d 100644 (file)
@@ -3266,6 +3266,11 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
        u8 val;
        int ret, max_sds_rings = adapter->max_sds_rings;
 
+       if (test_bit(__QLCNIC_RESETTING, &adapter->state)) {
+               netdev_info(netdev, "Device is resetting\n");
+               return -EBUSY;
+       }
+
        if (qlcnic_get_diag_lock(adapter)) {
                netdev_info(netdev, "Device in diagnostics mode\n");
                return -EBUSY;