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
98 } __packed records[0];98 } __packed records[0];
99} __packed;99} __packed;
100 100
101struct nd_cmd_clear_error {
102 __u64 address;
103 __u64 length;
104 __u32 status;
105 __u8 reserved[4];
106 __u64 cleared;
107} __packed;
108
101enum {109enum {
102 ND_CMD_IMPLEMENTED = 0,110 ND_CMD_IMPLEMENTED = 0,
103 111
@@ -105,6 +113,7 @@ enum { · 1 unmodified line
105 ND_CMD_ARS_CAP = 1,113 ND_CMD_ARS_CAP = 1,
106 ND_CMD_ARS_START = 2,114 ND_CMD_ARS_START = 2,
107 ND_CMD_ARS_STATUS = 3,115 ND_CMD_ARS_STATUS = 3,
116 ND_CMD_CLEAR_ERROR = 4,
108 117
109 /* per-dimm commands */118 /* per-dimm commands */
110 ND_CMD_SMART = 1,119 ND_CMD_SMART = 1,
@@ -129,6 +138,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) · 18 unmodified lines
129 [ND_CMD_ARS_CAP] = "ars_cap",138 [ND_CMD_ARS_CAP] = "ars_cap",
130 [ND_CMD_ARS_START] = "ars_start",139 [ND_CMD_ARS_START] = "ars_start",
131 [ND_CMD_ARS_STATUS] = "ars_status",140 [ND_CMD_ARS_STATUS] = "ars_status",
141 [ND_CMD_CLEAR_ERROR] = "clear_error",
132 };142 };
133 143
134 if (cmd < ARRAY_SIZE(names) && names[cmd])144 if (cmd < ARRAY_SIZE(names) && names[cmd])
@@ -187,6 +197,9 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 52 unmodified lines
187#define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\197#define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
188 struct nd_cmd_ars_status)198 struct nd_cmd_ars_status)
189 199
200#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, ND_CMD_CLEAR_ERROR,\
201 struct nd_cmd_clear_error)
202
190#define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */203#define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */
191#define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */204#define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */
192#define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */205#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