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>
This commit is contained in:
committed by
David S. Miller
parent
12645a196e
commit
009bc06e53
@@ -5029,6 +5029,34 @@ static int igb_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
|
||||
}
|
||||
}
|
||||
|
||||
s32 igb_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
|
||||
{
|
||||
struct igb_adapter *adapter = hw->back;
|
||||
u16 cap_offset;
|
||||
|
||||
cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP);
|
||||
if (!cap_offset)
|
||||
return -E1000_ERR_CONFIG;
|
||||
|
||||
pci_read_config_word(adapter->pdev, cap_offset + reg, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 igb_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
|
||||
{
|
||||
struct igb_adapter *adapter = hw->back;
|
||||
u16 cap_offset;
|
||||
|
||||
cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP);
|
||||
if (!cap_offset)
|
||||
return -E1000_ERR_CONFIG;
|
||||
|
||||
pci_write_config_word(adapter->pdev, cap_offset + reg, *value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void igb_vlan_rx_register(struct net_device *netdev,
|
||||
struct vlan_group *grp)
|
||||
{
|
||||
|
Reference in New Issue
Block a user