fm10k: force link to remain down for at least a second on resume events
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 7 Jun 2016 23:09:00 +0000 (16:09 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 20 Jul 2016 22:22:16 +0000 (15:22 -0700)
When we resume from an AER recovery with many active VFs, the PF sees
many spurious link up and link down events. Prevent this by delaying
link down for at least one second after the resume event.

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>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c

index d4ccb2a0c585df93f943a0cfaa9f1f5417e79aa5..b8245c734c969442bd6aa5d999fcff9c194ed62d 100644 (file)
@@ -2158,6 +2158,10 @@ static int fm10k_handle_resume(struct fm10k_intfc *interface)
        interface->host_ready = false;
        fm10k_watchdog_host_not_ready(interface);
 
+       /* force link to stay down for a second to prevent link flutter */
+       interface->link_down_event = jiffies + (HZ);
+       set_bit(__FM10K_LINK_DOWN, &interface->state);
+
        /* clear the service task disable bit to allow service task to start */
        clear_bit(__FM10K_SERVICE_DISABLE, &interface->state);
        fm10k_service_event_schedule(interface);