summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2015-11-19 08:05:35 -0800
committerBjorn Helgaas <bhelgaas@google.com>2015-12-03 10:42:59 -0600
commit57d86a0485a30145382ad03b9504cc03ba4641c7 (patch)
tree25e13c900e23fe6a7bdd67dd29946c5af0763f94 /drivers/pci/hotplug
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
downloadlinux-stable-57d86a0485a30145382ad03b9504cc03ba4641c7.tar.gz
linux-stable-57d86a0485a30145382ad03b9504cc03ba4641c7.tar.bz2
linux-stable-57d86a0485a30145382ad03b9504cc03ba4641c7.zip
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>
Diffstat (limited to 'drivers/pci/hotplug')
0 files changed, 0 insertions, 0 deletions