Skip to content

PCIe Enclosure LED Management

Mariusz Tkaczyk linux-leds linux-pci 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest3 patches 6 repliesIn review
  2. v63 patches 7 repliesSuperseded
  3. v53 patches 4 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches11 repliesSuperseded
v33 patches13 repliesSuperseded
v23 patches18 repliesSuperseded
v12 patches10 repliesSuperseded

Changes in v7 from the cover letter

- Removed links, suggested by Bjorn.
- npem->active_inds_initialized:1 moved to DSM commit, suggested by Bjorn.
- Improve justification for active_inds_initialized, suggested by Bjorn.
- Chosen backed logging added, suggested by Bjorn.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3leds: Init leds class earlierdrivers/Makefile+3 -13 replies
2/3PCI/NPEM: Add Native PCIe Enclosure Management supportDocumentation/ABI/testing/sysfs-bus-pci drivers/pci/Kconfig drivers/pci/Makefile +6 more+548 -00 replies
3/3PCI/NPEM: Add _DSM PCIe SSD status LED managementDocumentation/ABI/testing/sysfs-bus-pci drivers/pci/npem.c+189 -81 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph HellwigIlpo JärvinenStuart Hayes
SeriesR-b R-b T-b
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/3] PCIe Enclosure LED Management

Patchset is named as PCIe Enclosure LED Management because it adds two features:
- Native PCIe Enclosure Management (NPEM)
- PCIe SSD Status LED Management (DSM)

Both are pattern oriented standards, they tell which "indication" should blink. It doesn't control physical LED or pattern visualization.

Overall, driver is simple but it was not simple to fit it into interfaces we have in kernel (We considered leds and enclosure interfaces). It reuses leds interface, this approach seems to be the best because:
- leds are actively maintained, no new interface added.
- leds do not require any extensions, enclosure needs to be adjusted first.

There are trade-offs:
- "brightness" is the name of sysfs file to control led. It is not natural to use brightness to set patterns, that is why multiple led devices are created (one per indication);
- Update of one led may affect other leds, led triggers may not work as expected.

Changes from v1:
- Renamed "pattern" to indication.
- DSM support added.
- Fixed nits reported by Bjorn.

Changes from v2:
- Introduce lazy loading to allow DELL _DSM quirks to work, reported by Stuart.
- leds class initcall moved up in Makefile, proposed by Dan.
- fix other nits reported by Dan and Iipo.

Changes from v3:
- Remove unnecessary packed attr.
- Fix doc issue reported by lkp.
- Fix read_poll_timeout() error handling reported by Iipo.
- Minor fixes reported by Christoph.

Changes from v4:
- Use 0 / 1 instead of LED_OFF/LED_ON, suggested by Marek.
- Documentation added, suggested by Bjorn.

Change from v5:
- Remove unnecessary _packed, reported by Christoph.
- Changed "led" to "LED" and other typos suggested by Randy.

Change from v6:
- Removed links, suggested by Bjorn.
- npem->active_inds_initialized:1 moved to DSM commit, suggested by Bjorn.
- Improve justification for active_inds_initialized, suggested by Bjorn.
- Chosen backed logging added, suggested by Bjorn.

Cc Arnd Bergmann <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Dan Williams <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Ilpo Jarvinen <[email protected]>
Cc Lukas Wunner <[email protected]>
Cc Lee Jones <[email protected]>
Cc Keith Busch <[email protected]>
Cc Marek Behun <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Stuart Hayes <[email protected]>

Mariusz Tkaczyk (3):
leds: Init leds class earlier
PCI/NPEM: Add Native PCIe Enclosure Management support PCI/NPEM: Add _DSM PCIe SSD status LED management

 Documentation/ABI/testing/sysfs-bus-pci |  72 +++
 drivers/Makefile                        |   4 +-
 drivers/pci/Kconfig                     |   9 +
 drivers/pci/Makefile                    |   1 +
 drivers/pci/npem.c                      | 597 ++++++++++++++++++++++++
 drivers/pci/pci.h                       |   8 +
 drivers/pci/probe.c                     |   2 +
 drivers/pci/remove.c                    |   2 +
 include/linux/pci.h                     |   3 +
 include/uapi/linux/pci_regs.h           |  35 ++
 10 files changed, 732 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pci/npem.c
Signature · 1 line
2.35.3