summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-06-03 15:42:11 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-07-20 15:22:09 -0700
commit1b00c6c064302354fce71d7c363945fe9e967f7c (patch)
tree56571afe8cb5ebc0568f402cb651d8c1d20653d6 /drivers/net/ethernet/intel/fm10k
parentc0d661ca3701f38d9313ca3954e3741ad92e3aaa (diff)
fm10k: no need to continue in fm10k_down if __FM10K_DOWN already set
Return early from fm10k_down() when we are already down, since that means another thread is either already finished or has started going down, so shouldn't conflict with them. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index e05aca9bef0e..610c313610c8 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1601,7 +1601,8 @@ void fm10k_down(struct fm10k_intfc *interface)
int err;
/* signal that we are down to the interrupt handler and service task */
- set_bit(__FM10K_DOWN, &interface->state);
+ if (test_and_set_bit(__FM10K_DOWN, &interface->state))
+ return;
/* call carrier off first to avoid false dev_watchdog timeouts */
netif_carrier_off(netdev);