Skip to content

RFC Add PCIe enclosure management support

Stuart Hayes linux-cxl linux-pci llvm oe-kbuild-all 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 3 repliesIn review
  2. v1 RFC3 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add support for seven more indicators in enclosure driverDocumentation/ABI/testing/sysfs-class-enclosure drivers/misc/enclosure.c include/linux/enclosure.h+149 -781 reply
2/3Add PCIe enclosure management auxiliary driverdrivers/pci/pcie/Kconfig drivers/pci/pcie/Makefile drivers/pci/pcie/pcie_em.c +2 more+589 -11 reply
3/3Register auxiliary device for PCIe enclosure managementdrivers/nvme/host/pci.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/3] Add PCIe enclosure management support

This patch set adds support for two PCIe enclosure management methods, "Native PCIe Enclosure Management" (defined in the PCI Express Base Spec) and "_DSM Definitions for PCIe SSD Status LED" (defined in the PCI Firmware Spec). The latter is very similar to the former, but uses a _DSM interface (which can be provided by firmware) rather than a PCIe extended capability. Each provides a way to control up to ten indicator states (such as locate, fault, etc.)

There are three patches in the set:

(1) Expands the existing enclosure driver to support more indicators.

(2) Adds an auxiliary driver "pcie_em" that can attach to auxiliary devices created by the drivers of any devices that can support PCIe enclosure management (nvme, pcieport, and cxl). It will register an enclosure device with one component for each device with an enclosure management interface.

(3) Modifies the nvme driver to create an auxiliary device to which the pcie_em driver can attach.

These patches do not modify the cxl or pcieport drivers to add support, though the driver was designed to make it easy to do so.
---
v2: fixed compile error related to switch default in enclosure.c
added documentation of added sysfs attributes
---

Stuart Hayes (3):
Add support for seven more indicators in enclosure driver Add PCIe enclosure management auxiliary driver Register auxiliary device for PCIe enclosure management

 .../ABI/testing/sysfs-class-enclosure         |  14 +
 drivers/misc/enclosure.c                      | 191 ++++---
 drivers/nvme/host/pci.c                       |  11 +
 drivers/pci/pcie/Kconfig                      |   8 +
 drivers/pci/pcie/Makefile                     |   1 +
 drivers/pci/pcie/pcie_em.c                    | 473 ++++++++++++++++++
 include/linux/enclosure.h                     |  22 +
 include/linux/pcie_em.h                       |  97 ++++
 include/uapi/linux/pci_regs.h                 |  11 +-
 9 files changed, 749 insertions(+), 79 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-enclosure
 create mode 100644 drivers/pci/pcie/pcie_em.c
 create mode 100644 include/linux/pcie_em.h
Signature · 1 line
2.31.1