diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-06 01:40:07 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-01-18 07:54:59 -0500 |
commit | ffe0b2ff17e1d59d33334767e07e8141de4bd5c8 (patch) | |
tree | 92aba416877934e9dc3339477c3a05677882b6dc /drivers/net/ethernet/intel | |
parent | 203e41514a557b71c4c42b4bb2912b56fa0c2fdc (diff) |
e1000e: Use standard #defines for PCIe Capability ASPM fields
Use the standard #defines for PCIe Capability ASPM fields.
Previously we used PCIE_LINK_STATE_L0S and PCIE_LINK_STATE_L1 directly, but
these are defined for the Linux ASPM interfaces, e.g.,
pci_disable_link_state(), and only coincidentally match the actual register
bits. PCIE_LINK_STATE_CLKPM, also part of that interface, does not match
the register bit.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: e1000-devel@lists.sourceforge.net
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 05538e66c809..bf2c84cf250f 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -5548,14 +5548,21 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) | |||
5548 | #else | 5548 | #else |
5549 | static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) | 5549 | static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) |
5550 | { | 5550 | { |
5551 | u16 aspm_ctl = 0; | ||
5552 | |||
5553 | if (state & PCIE_LINK_STATE_L0S) | ||
5554 | aspm_ctl |= PCI_EXP_LNKCTL_ASPM_L0S; | ||
5555 | if (state & PCIE_LINK_STATE_L1) | ||
5556 | aspm_ctl |= PCI_EXP_LNKCTL_ASPM_L1; | ||
5557 | |||
5551 | /* Both device and parent should have the same ASPM setting. | 5558 | /* Both device and parent should have the same ASPM setting. |
5552 | * Disable ASPM in downstream component first and then upstream. | 5559 | * Disable ASPM in downstream component first and then upstream. |
5553 | */ | 5560 | */ |
5554 | pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, state); | 5561 | pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, aspm_ctl); |
5555 | 5562 | ||
5556 | if (pdev->bus->self) | 5563 | if (pdev->bus->self) |
5557 | pcie_capability_clear_word(pdev->bus->self, PCI_EXP_LNKCTL, | 5564 | pcie_capability_clear_word(pdev->bus->self, PCI_EXP_LNKCTL, |
5558 | state); | 5565 | aspm_ctl); |
5559 | } | 5566 | } |
5560 | #endif | 5567 | #endif |
5561 | static void e1000e_disable_aspm(struct pci_dev *pdev, u16 state) | 5568 | static void e1000e_disable_aspm(struct pci_dev *pdev, u16 state) |