diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2014-02-21 20:23:53 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-03-19 20:17:23 -0400 |
commit | ed19231c760a5103d75d285ca5a5ba4177ec09eb (patch) | |
tree | 4822ca92b9940800831e301e513f318240c18fed /drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | |
parent | 0c375ac1aa863495a54b3a051eead667e49ace5b (diff) |
ixgbe: add ixgbe_write_pci_cfg_word with ixgbe_removed check
Inline with the current use for ixgbe_read_pci_cfg_word, create a
similar function for writing PCI config, which checks whether the
adapter has been removed first, if Live Error Recovery has been enabled.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c index f8ebe583a2ab..7fe22542e404 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | |||
@@ -58,7 +58,6 @@ static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, | |||
58 | **/ | 58 | **/ |
59 | static void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) | 59 | static void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) |
60 | { | 60 | { |
61 | struct ixgbe_adapter *adapter = hw->back; | ||
62 | u32 gcr = IXGBE_READ_REG(hw, IXGBE_GCR); | 61 | u32 gcr = IXGBE_READ_REG(hw, IXGBE_GCR); |
63 | u16 pcie_devctl2; | 62 | u16 pcie_devctl2; |
64 | 63 | ||
@@ -84,11 +83,8 @@ static void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) | |||
84 | * 16ms to 55ms | 83 | * 16ms to 55ms |
85 | */ | 84 | */ |
86 | pcie_devctl2 = ixgbe_read_pci_cfg_word(hw, IXGBE_PCI_DEVICE_CONTROL2); | 85 | pcie_devctl2 = ixgbe_read_pci_cfg_word(hw, IXGBE_PCI_DEVICE_CONTROL2); |
87 | if (ixgbe_removed(hw->hw_addr)) | ||
88 | return; | ||
89 | pcie_devctl2 |= IXGBE_PCI_DEVICE_CONTROL2_16ms; | 86 | pcie_devctl2 |= IXGBE_PCI_DEVICE_CONTROL2_16ms; |
90 | pci_write_config_word(adapter->pdev, | 87 | ixgbe_write_pci_cfg_word(hw, IXGBE_PCI_DEVICE_CONTROL2, pcie_devctl2); |
91 | IXGBE_PCI_DEVICE_CONTROL2, pcie_devctl2); | ||
92 | out: | 88 | out: |
93 | /* disable completion timeout resend */ | 89 | /* disable completion timeout resend */ |
94 | gcr &= ~IXGBE_GCR_CMPL_TMOUT_RESEND; | 90 | gcr &= ~IXGBE_GCR_CMPL_TMOUT_RESEND; |