diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2019-09-23 16:10:14 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-09-23 16:10:14 -0500 |
commit | 203104c8d5ece4e4c46096db40e04fe48b442cc6 (patch) | |
tree | 02445f61878e750b24f4bae00feada40a15b7c65 /drivers/pci/hotplug/pciehp_core.c | |
parent | Merge branch 'pci/p2pdma' (diff) | |
parent | PCI: pciehp: Refer to "Indicators" instead of "LEDs" in comments (diff) | |
download | linux-dev-203104c8d5ece4e4c46096db40e04fe48b442cc6.tar.xz linux-dev-203104c8d5ece4e4c46096db40e04fe48b442cc6.zip |
Merge branch 'pci/pciehp'
- Cleanup pciehp LED/indicator control with a new consolidated
pciehp_set_indicators() interface that controls both Attention and
Power Indicators (Denis Efremov)
* pci/pciehp:
PCI: pciehp: Refer to "Indicators" instead of "LEDs" in comments
PCI: pciehp: Remove pciehp_green_led_{on,off,blink}()
PCI: pciehp: Remove pciehp_set_attention_status()
PCI: pciehp: Combine adjacent indicator updates
PCI: pciehp: Add pciehp_set_indicators() to set both indicators
Diffstat (limited to 'drivers/pci/hotplug/pciehp_core.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 6ad0d86762cb..b3122c151b80 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -95,15 +95,20 @@ static void cleanup_slot(struct controller *ctrl) } /* - * set_attention_status - Turns the Amber LED for a slot on, off or blink + * set_attention_status - Turns the Attention Indicator on, off or blinking */ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status) { struct controller *ctrl = to_ctrl(hotplug_slot); struct pci_dev *pdev = ctrl->pcie->port; + if (status) + status <<= PCI_EXP_SLTCTL_ATTN_IND_SHIFT; + else + status = PCI_EXP_SLTCTL_ATTN_IND_OFF; + pci_config_pm_runtime_get(pdev); - pciehp_set_attention_status(ctrl, status); + pciehp_set_indicators(ctrl, INDICATOR_NOOP, status); pci_config_pm_runtime_put(pdev); return 0; } |