History

block: sed-opal: Implement IOC_OPAL_REVERT_LSP

This is used in conjunction with IOC_OPAL_REVERT_TPR to return a drive to Original Factory State without erasing the data. If IOC_OPAL_REVERT_LSP is called with opal_revert_lsp.options bit OPAL_PRESERVE set prior to calling IOC_OPAL_REVERT_TPR, the drive global locking range will not be erased.

Greg Joyce committed 3 years ago

Commit 5c82efc1 parent 9fb10724 files · +56 −0Browse files

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

Unified · Split

include/uapi/linux/sed-opal.h+11−0
@@ -56,6 +56,10 @@ struct opal_key { · 55 unmodified lines
5656 __u8 key[OPAL_KEY_MAX];
5757 };
5858
59+enum opal_revert_lsp_opts {
60+ OPAL_PRESERVE = 0x01,
61+};
62+
5963 struct opal_lr_act {
6064 struct opal_key key;
6165 __u32 sum;
@@ -178,6 +182,12 @@ struct opal_discovery { · 116 unmodified lines
178182 __u64 size;
179183 };
180184
185+struct opal_revert_lsp {
186+ struct opal_key key;
187+ __u32 options;
188+ __u32 __pad;
189+};
190+
181191 #define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
182192 #define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
183193 #define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -198,5 +208,6 @@ struct opal_discovery { · 14 unmodified lines
198208 #define IOC_OPAL_GET_LR_STATUS _IOW('p', 237, struct opal_lr_status)
199209 #define IOC_OPAL_GET_GEOMETRY _IOR('p', 238, struct opal_geometry)
200210 #define IOC_OPAL_DISCOVERY _IOW('p', 239, struct opal_discovery)
211+#define IOC_OPAL_REVERT_LSP _IOW('p', 240, struct opal_revert_lsp)
201212
202213 #endif /* _UAPI_SED_OPAL_H */

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