History

nfit, libnvdimm: clear poison command support

Add the boiler-plate for a 'clear error' command based on section 9.20.7.6 "Function Index 4 - Clear Uncorrectable Error" from the ACPI 6.1 specification, and add a reference implementation in nfit_test.

Dan Williams committed 10 years ago

Commit d4f32361 parent 07accfa4 files · +72 −1Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/ndctl.h+13−0
@@ -98,6 +98,14 @@ struct nd_cmd_ars_status { · 97 unmodified lines
9898 } __packed records[0];
9999 } __packed;
100100
101+struct nd_cmd_clear_error {
102+ __u64 address;
103+ __u64 length;
104+ __u32 status;
105+ __u8 reserved[4];
106+ __u64 cleared;
107+} __packed;
108+
101109 enum {
102110 ND_CMD_IMPLEMENTED = 0,
103111
@@ -105,6 +113,7 @@ enum { · 1 unmodified line
105113 ND_CMD_ARS_CAP = 1,
106114 ND_CMD_ARS_START = 2,
107115 ND_CMD_ARS_STATUS = 3,
116+ ND_CMD_CLEAR_ERROR = 4,
108117
109118 /* per-dimm commands */
110119 ND_CMD_SMART = 1,
@@ -129,6 +138,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) · 18 unmodified lines
129138 [ND_CMD_ARS_CAP] = "ars_cap",
130139 [ND_CMD_ARS_START] = "ars_start",
131140 [ND_CMD_ARS_STATUS] = "ars_status",
141+ [ND_CMD_CLEAR_ERROR] = "clear_error",
132142 };
133143
134144 if (cmd < ARRAY_SIZE(names) && names[cmd])
@@ -187,6 +197,9 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 52 unmodified lines
187197 #define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
188198 struct nd_cmd_ars_status)
189199
200+#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR,\
201+ struct nd_cmd_clear_error)
202+
190203 #define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */
191204 #define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */
192205 #define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t