linux-stable/drivers/pci/pcie
Andy Lutomirski 57d86a0485 PCI/ASPM: Make sysfs link_state_store() consistent with link_state_show()
If CONFIG_PCIEASPM_DEBUG is set, then PCI devices have a link_state
attribute.  Reading that attribute shows the state as a bit mask: 1
means L0S upstream, 2 means L0S downstream, and 4 means L1.

Oddly, writing to link_state is inconsistent and gets translated, leading
to mysterious results in which the value you store isn't comparable the
value you load back out.

Fix it by making link_state_store() match link_state_show().

[bhelgaas: Check "aspm_disabled" *before* validating input.  When
"aspm_disabled" is set, this changes the error for invalid input from
-EINVAL to -EPERM.]

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2015-12-03 10:42:59 -06:00
..
aer PCI/AER: Clear error status registers during enumeration and restore 2015-09-17 10:09:37 -05:00
aspm.c PCI/ASPM: Make sysfs link_state_store() consistent with link_state_show() 2015-12-03 10:42:59 -06:00
Kconfig PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core 2014-12-04 00:50:33 +01:00
Makefile PCI: PCIe: Move PCIe PME code to the pcie directory 2010-08-24 13:47:48 -07:00
pme.c PCI / PM: handle failure to enable wakeup on PCIe PME 2014-10-23 22:47:28 +02:00
portdrv.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
portdrv_acpi.c PCI: Fix missing prototype for pcie_port_acpi_setup() 2013-04-12 11:17:47 -06:00
portdrv_bus.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
portdrv_core.c PCI: Fix pcie_port_device_resume() comment 2015-07-14 13:41:04 -05:00
portdrv_pci.c PCI/PM: Drop unused runtime PM support code for PCIe ports 2014-09-02 17:12:15 -06:00