summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Chopra <manish.chopra@qlogic.com>2013-08-15 16:29:29 +0400
committerDavid S. Miller <davem@davemloft.net>2013-08-16 01:35:01 +0400
commitd1fcc172570fa4de69c60bdabe1e1ccfcfe80c26 (patch)
tree0a0d990c153d27186470a762dac17b1fe0a699b5
parent482b3c3634f73f32bf1059b4470e1c5709c05ddf (diff)
downloadlinux-d1fcc172570fa4de69c60bdabe1e1ccfcfe80c26.tar.xz
qlcnic: Fix diagnostic interrupt test for 83xx adapters
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>
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 92da9980a0a0..9d4bb7f83904 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -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;