aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000e/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/netdev.c')
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 1c650ecae88d..26a2ba2f8986 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5570,16 +5570,15 @@ static void e1000_complete_shutdown(struct pci_dev *pdev, bool sleep,
5570 */ 5570 */
5571 if (adapter->flags & FLAG_IS_QUAD_PORT) { 5571 if (adapter->flags & FLAG_IS_QUAD_PORT) {
5572 struct pci_dev *us_dev = pdev->bus->self; 5572 struct pci_dev *us_dev = pdev->bus->self;
5573 int pos = pci_pcie_cap(us_dev);
5574 u16 devctl; 5573 u16 devctl;
5575 5574
5576 pci_read_config_word(us_dev, pos + PCI_EXP_DEVCTL, &devctl); 5575 pcie_capability_read_word(us_dev, PCI_EXP_DEVCTL, &devctl);
5577 pci_write_config_word(us_dev, pos + PCI_EXP_DEVCTL, 5576 pcie_capability_write_word(us_dev, PCI_EXP_DEVCTL,
5578 (devctl & ~PCI_EXP_DEVCTL_CERE)); 5577 (devctl & ~PCI_EXP_DEVCTL_CERE));
5579 5578
5580 e1000_power_off(pdev, sleep, wake); 5579 e1000_power_off(pdev, sleep, wake);
5581 5580
5582 pci_write_config_word(us_dev, pos + PCI_EXP_DEVCTL, devctl); 5581 pcie_capability_write_word(us_dev, PCI_EXP_DEVCTL, devctl);
5583 } else { 5582 } else {
5584 e1000_power_off(pdev, sleep, wake); 5583 e1000_power_off(pdev, sleep, wake);
5585 } 5584 }
@@ -5593,25 +5592,15 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
5593#else 5592#else
5594static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) 5593static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
5595{ 5594{
5596 int pos;
5597 u16 reg16;
5598
5599 /* 5595 /*
5600 * Both device and parent should have the same ASPM setting. 5596 * Both device and parent should have the same ASPM setting.
5601 * Disable ASPM in downstream component first and then upstream. 5597 * Disable ASPM in downstream component first and then upstream.
5602 */ 5598 */
5603 pos = pci_pcie_cap(pdev); 5599 pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, state);
5604 pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &reg16);
5605 reg16 &= ~state;
5606 pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);
5607
5608 if (!pdev->bus->self)
5609 return;
5610 5600
5611 pos = pci_pcie_cap(pdev->bus->self); 5601 if (pdev->bus->self)
5612 pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, &reg16); 5602 pcie_capability_clear_word(pdev->bus->self, PCI_EXP_LNKCTL,
5613 reg16 &= ~state; 5603 state);
5614 pci_write_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, reg16);
5615} 5604}
5616#endif 5605#endif
5617static void e1000e_disable_aspm(struct pci_dev *pdev, u16 state) 5606static void e1000e_disable_aspm(struct pci_dev *pdev, u16 state)