aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-07-23 14:08:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-26 12:46:49 -0400
commit009bc06e5311b48c77b7708d9e226ae0f110373a (patch)
treefceeade485befdbda8047d14bb59c9c0b0b0dad8 /drivers/net/igb/igb_main.c
parent12645a196eccb9209f88915f56a686086dea1a16 (diff)
igb: add completion timeout workaround for 82575/82576
The 82575 and 82576 hardware can both experience data corruption issues if a pci-e completion arrives after the timeout value. In order to avoid this we need to increase the timeout value while pci-e master is disabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 39b3b6aa650b..2cb546078c52 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -5029,6 +5029,34 @@ static int igb_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
5029 } 5029 }
5030} 5030}
5031 5031
5032s32 igb_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
5033{
5034 struct igb_adapter *adapter = hw->back;
5035 u16 cap_offset;
5036
5037 cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP);
5038 if (!cap_offset)
5039 return -E1000_ERR_CONFIG;
5040
5041 pci_read_config_word(adapter->pdev, cap_offset + reg, value);
5042
5043 return 0;
5044}
5045
5046s32 igb_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
5047{
5048 struct igb_adapter *adapter = hw->back;
5049 u16 cap_offset;
5050
5051 cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP);
5052 if (!cap_offset)
5053 return -E1000_ERR_CONFIG;
5054
5055 pci_write_config_word(adapter->pdev, cap_offset + reg, *value);
5056
5057 return 0;
5058}
5059
5032static void igb_vlan_rx_register(struct net_device *netdev, 5060static void igb_vlan_rx_register(struct net_device *netdev,
5033 struct vlan_group *grp) 5061 struct vlan_group *grp)
5034{ 5062{