Centos-kernel-stream-9/drivers/pci/hotplug
Myron Stowe a6a6933647 PCI: pciehp: Retain Power Indicator bits for userspace indicators
JIRA: https://issues.redhat.com/browse/RHEL-41181
Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=for-linus

commit e8c0bc041bd69a1c7506e875846dc44285ced153 (pci/for-linus)
Author: Blazej Kucman <blazej.kucman@intel.com>
Date:   Mon Jul 22 16:14:40 2024 +0200

    PCI: pciehp: Retain Power Indicator bits for userspace indicators

    The sysfs "attention" file normally controls the Slot Control Attention
    Indicator with 0 (off), 1 (on), 2 (blink) settings.

    576243b3f9 ("PCI: pciehp: Allow exclusive userspace control of
    indicators") added pciehp_set_raw_indicator_status() to allow userspace to
    directly control all four bits in both the Attention Indicator and the
    Power Indicator fields via the "attention" file.

    This is used on Intel VMD bridges so utilities like "ledmon" can use sysfs
    "attention" to control up to 16 indicators for NVMe device RAID status.

    abaaac4845a0 ("PCI: hotplug: Use FIELD_GET/PREP()") broke this by masking
    the sysfs data with PCI_EXP_SLTCTL_AIC, which discards the upper two bits
    intended for the Power Indicator Control field (PCI_EXP_SLTCTL_PIC).

    For NVMe devices behind an Intel VMD, ledmon settings that use the
    PCI_EXP_SLTCTL_PIC bits, i.e., ATTENTION_REBUILD (0x5), ATTENTION_LOCATE
    (0x7), ATTENTION_FAILURE (0xD), ATTENTION_OFF (0xF), no longer worked
    correctly.

    Mask with PCI_EXP_SLTCTL_AIC | PCI_EXP_SLTCTL_PIC to retain both the
    Attention Indicator and the Power Indicator bits.

    Fixes: abaaac4845a0 ("PCI: hotplug: Use FIELD_GET/PREP()")
    Link: https://lore.kernel.org/r/20240722141440.7210-1-blazej.kucman@intel.com
    Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
    [bhelgaas: commit log]
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Cc: stable@vger.kernel.org      # v6.7+

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2024-07-29 12:22:38 -06:00
..
Kconfig
Makefile
TODO PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2023-03-07 07:21:27 -07:00
acpi_pcihp.c
acpiphp.h PCI: Remove unused function declarations 2023-12-15 16:22:29 -07:00
acpiphp_core.c PCI: acpiphp: Allow built-in drivers for Attention Indicators 2024-02-21 15:35:36 -07:00
acpiphp_glue.c Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2024-02-25 08:39:32 -07:00
acpiphp_ibm.c
cpci_hotplug.h PCI: Remove unused function declarations 2023-12-15 16:22:29 -07:00
cpci_hotplug_core.c
cpci_hotplug_pci.c
cpcihp_generic.c
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp.h
cpqphp_core.c
cpqphp_ctrl.c PCI: Use PCI_HEADER_TYPE_* instead of literals 2023-12-12 16:16:06 -07:00
cpqphp_nvram.c
cpqphp_nvram.h
cpqphp_pci.c PCI: Use PCI_HEADER_TYPE_* instead of literals 2023-12-12 16:16:06 -07:00
cpqphp_sysfs.c
ibmphp.h Merge: VMD driver updates 2024-01-12 13:40:45 -05:00
ibmphp_core.c
ibmphp_ebda.c
ibmphp_hpc.c
ibmphp_pci.c Merge: VMD driver updates 2024-01-12 13:40:45 -05:00
ibmphp_res.c
pci_hotplug_core.c
pciehp.h
pciehp_core.c PCI: hotplug: Use FIELD_GET/PREP() 2024-02-25 08:39:29 -07:00
pciehp_ctrl.c PCI: pciehp: Cancel bringup sequence if card is not present 2023-09-19 09:13:47 -06:00
pciehp_hpc.c PCI: pciehp: Retain Power Indicator bits for userspace indicators 2024-07-29 12:22:38 -06:00
pciehp_pci.c PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock 2023-09-01 09:04:26 -06:00
pnv_php.c PCI: hotplug: Use FIELD_GET/PREP() 2024-02-25 08:39:29 -07:00
rpadlpar.h
rpadlpar_core.c
rpadlpar_sysfs.c
rpaphp.h
rpaphp_core.c
rpaphp_pci.c PCI: rpaphp: Error out on busy status from get-sensor-state 2023-09-27 06:40:12 +00:00
rpaphp_slot.c
s390_pci_hpc.c
shpchp.h PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2023-03-07 07:21:27 -07:00
shpchp_core.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-03-29 08:56:44 -06:00
shpchp_ctrl.c
shpchp_hpc.c PCI: shpchp: Remove unused get_mode1_ECC_cap callback 2023-03-07 07:21:27 -07:00
shpchp_pci.c
shpchp_sysfs.c PCI: Make pci_bus_for_each_resource() index optional 2023-09-05 09:16:41 -06:00