Skip to content

nvme: Export CSTS register via sysfs

Alan Adamson linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1nvme: Export CSTS register via sysfsdrivers/nvme/host/core.c+16 -00 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchHimanshu Madhani
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] nvme: Export CSTS register via sysfs

This patch exports the NVMe Controller CSTS register via sysfs. This feature can be used by userland executables that accessed CSTS and possibly other registers by mapping them into user space. Since this ability may not always available, exporting certain registers via sysfs provides a safe/read-only way to access registers from outside the kernel.

Testing:

# Controller in the RDY state

# cat /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/csts
1

# Controller in the FAILED state

# cat /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/csts
2

# A virtualized csts register can be accessed for fabric devices

# cat /sys/devices/virtual/nvme-fabrics/ctl/nvme1/csts
1

Alan Adamson (1):
Export CSTS register via sysfs

 drivers/nvme/host/core.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Signature · 7 lines
2.18.4


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme