aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-06-07 16:08:57 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-07-20 15:22:15 -0700
commit0d63a8f50e7a7810b0631cd8ea66d44dafb215e6 (patch)
treea28abb4bfef1ce30ae4e540e0a6044c9813eb055 /drivers/net/ethernet/intel
parentfm10k: use common flow for suspend and resume (diff)
downloadlinux-dev-0d63a8f50e7a7810b0631cd8ea66d44dafb215e6.tar.xz
linux-dev-0d63a8f50e7a7810b0631cd8ea66d44dafb215e6.zip
fm10k: enable bus master after every reset
If an FLR occurs, VF devices will be knocked out of bus master mode, and the driver will be unable to recover from the reset properly, resulting in malicious driver events and an infinite reset loop. In the normal case, the bus master mode will already be enabled and this call will essentially be a no-op. Since we're doing this every reset, it is possible we could remove the other calls to pci_set_master() but it seems not harmful to just leave them in place. 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')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index b02361c42705..5e40460b041d 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -174,6 +174,8 @@ static int fm10k_handle_reset(struct fm10k_intfc *interface)
rtnl_lock();
+ pci_set_master(interface->pdev);
+
/* reset and initialize the hardware so it is in a known state */
err = hw->mac.ops.reset_hw(hw);
if (err) {