aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/fm10k
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-04-01 16:17:34 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-20 23:06:23 -0700
commit3417415c3a86d6bae8bfee495ce634f4d24e16b8 (patch)
tree5c8366cf6aab4c968a35ae2656fcf41e0c7a335c /drivers/net/ethernet/intel/fm10k
parentfm10k: correctly handle LPORT_MAP error (diff)
downloadlinux-dev-3417415c3a86d6bae8bfee495ce634f4d24e16b8.tar.xz
linux-dev-3417415c3a86d6bae8bfee495ce634f4d24e16b8.zip
fm10k: do not disable PCI device in fm10k_io_error_detected
fm10k_io_error_detected() does not need to call pci_disable_device(). In the cases where the reset needs to occur, the stack flow will result in calling fm10k_remove() which already disables the PCI device. If we leave the pci_disable_device(), we result in a warning about disabling an already disabled device. Many PCI drivers do call pci_disable_device() in their .error_detected() routines, but it does not appear to be required. In addition, these drivers have a check "is_pci_enabled()" call in their remove routines, which is how they chose to handle the duplicate device disable. This seems incorrect, since the PCI device structure is reference counted. It is very possible that the reference count for the PCI device could be greater than 1. In this case, you would remove the PCI device within the error_detected routine, reducing count to 1, then remove it again in the remove function, reducing it to zero. This would result in yet another disable somewhere else failing. Thus, we shouldn't be using is_pci_enabled() to check for this issue. Instead, just remove the extraneous pci_device_disable() found within the error_detected routine. 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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 9055681cf34d..1d833782d917 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -2207,8 +2207,6 @@ static pci_ers_result_t fm10k_io_error_detected(struct pci_dev *pdev,
rtnl_unlock();
- pci_disable_device(pdev);
-
/* Request a slot reset. */
return PCI_ERS_RESULT_NEED_RESET;
}