diff options
author | Keith Busch <keith.busch@intel.com> | 2016-09-13 10:31:59 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-22 18:20:11 -0500 |
commit | 576243b3f9eaa47ab568ac49574b3a095c2365f1 (patch) | |
tree | bb0eec720e02b97afa0a493c5c56088939875ea5 /arch/x86/pci | |
parent | 29a654e59f3698d70d85e289fc5ce7261493bba2 (diff) | |
download | lwn-576243b3f9eaa47ab568ac49574b3a095c2365f1.tar.gz lwn-576243b3f9eaa47ab568ac49574b3a095c2365f1.zip |
PCI: pciehp: Allow exclusive userspace control of indicators
PCIe hotplug supports optional Attention and Power Indicators, which are
used internally by pciehp. Users can't control the Power Indicator, but
they can control the Attention Indicator by writing to a sysfs "attention"
file.
The Slot Control register has two bits for each indicator, and the PCIe
spec defines the encodings for each as (Reserved/On/Blinking/Off). For
sysfs "attention" writes, pciehp_set_attention_status() maps into these
encodings, so the only useful write values are 0 (Off), 1 (On), and 2
(Blinking).
However, some platforms use all four bits for platform-specific indicators,
and they need to allow direct user control of them while preventing pciehp
from using them at all.
Add a "hotplug_user_indicators" flag to the pci_dev structure. When set,
pciehp does not use either the Attention Indicator or the Power Indicator,
and the low four bits (values 0x0 - 0xf) of sysfs "attention" write values
are written directly to the Attention Indicator Control and Power Indicator
Control fields.
[bhelgaas: changelog, rename flag and accessors to s/attention/indicator/]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/x86/pci')
0 files changed, 0 insertions, 0 deletions