]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fm10k: wait for queues to drain if stop_hw() fails once
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 7 Jun 2016 23:08:51 +0000 (16:08 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:04:21 +0000 (22:04 -0800)
commitd5eab92911cd7645620d13e43811fd3387b5a19f
treef674054dcea40f92d20d604cc5bfc3c94c5c8069
parent52906ce18cecf2215557523e04fd8bcef0b50e78
fm10k: wait for queues to drain if stop_hw() fails once

It turns out that sometimes during a reset the Tx queues will be
temporarily stuck longer than .stop_hw() expects. Work around this issue
by attempting to .stop_hw() first. If it tails, wait a number of
attempts until the Tx queues appear to be drained. After this, attempt
stop_hw() again. This ensures that we avoid waiting if we don't need to,
such as during the first initialization of a VF, and give the proper
amount of time necessary to recover from most situations. It is possible
that the hardware is actually stuck. For PFs, this is usually fixed by
a datapath reset. Unfortunately the VF cannot request a similar reset
for itself.

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>
Orabug: 25394529
(cherry picked from commit 94877768cfaa99f7b3757f29632faa5945f18872)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k.h
drivers/net/ethernet/intel/fm10k/fm10k_main.c
drivers/net/ethernet/intel/fm10k/fm10k_pci.c