• Mariusz Tkaczyk's avatar
    PCI/NPEM: Add _DSM PCIe SSD status LED management · 759ec282
    Mariusz Tkaczyk authored
    The PCIe SSD Status LED Management _DSM defined in PCI Firmware Spec r3.3
    sec 4.7 provides a way to manage LEDs via ACPI.
    
    The design is similar to NPEM defined in PCIe Base Specification r6.1 sec
    6.28:
    
      - Both standards are indication oriented,
    
      - _DSM supported bits correspond to NPEM capability register bits,
    
      - _DSM control bits correspond to NPEM control register bits.
    
    _DSM does not support enclosure-specific indications or the special NPEM
    commands NPEM_ENABLE and NPEM_RESET.
    
    _DSM is implemented as a second backend in NPEM driver. The backend used is
    logged with info priority. The same sysfs interface is used for both NPEM
    and _DSM.
    
    According to spec, _DSM has higher priority, and availability  of _DSM in
    not limited to devices with NPEM support.
    
    The Dell implementation of DSM uses acpi ipmi, which may not be available
    immediately (in fact it may take up to 10s for this interface to be
    available). It can determine if DSM is supported (GET_SUPPORTED_STATES_DSM
    is working) but it cannot serve GET_STATE_DSM or SET_STATE_DSM commands in
    this time.
    
    From userspace application perspective (primarily configured by systemd
    service) it is better to have not working but configured interface rather
    than have it available after few seconds.
    
    For that reason, npem->active_indications cache is now loaded lazily, i.e.
    any GET or SET request want cache to be updated if it is not done yet.
    
    Link: https://lore.kernel.org/r/20240904104848.23480-4-mariusz.tkaczyk@linux.intel.comSuggested-by: default avatarLukas Wunner <lukas@wunner.de>
    Signed-off-by: default avatarStuart Hayes <stuart.w.hayes@gmail.com>
    Signed-off-by: default avatarMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Tested-by: default avatarStuart Hayes <stuart.w.hayes@gmail.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
    759ec282
sysfs-bus-pci 23.1 KB