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
56 __u8 key[OPAL_KEY_MAX];56 __u8 key[OPAL_KEY_MAX];
57};57};
58 58
59enum opal_revert_lsp_opts {
60 OPAL_PRESERVE = 0x01,
61};
62
59struct opal_lr_act {63struct opal_lr_act {
60 struct opal_key key;64 struct opal_key key;
61 __u32 sum;65 __u32 sum;
@@ -178,6 +182,12 @@ struct opal_discovery { · 116 unmodified lines
178 __u64 size;182 __u64 size;
179};183};
180 184
185struct opal_revert_lsp {
186 struct opal_key key;
187 __u32 options;
188 __u32 __pad;
189};
190
181#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)191#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
182#define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)192#define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
183#define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)193#define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -198,5 +208,6 @@ struct opal_discovery { · 14 unmodified lines
198#define IOC_OPAL_GET_LR_STATUS _IOW('p', 237, struct opal_lr_status)208#define IOC_OPAL_GET_LR_STATUS _IOW('p', 237, struct opal_lr_status)
199#define IOC_OPAL_GET_GEOMETRY _IOR('p', 238, struct opal_geometry)209#define IOC_OPAL_GET_GEOMETRY _IOR('p', 238, struct opal_geometry)
200#define IOC_OPAL_DISCOVERY _IOW('p', 239, struct opal_discovery)210#define IOC_OPAL_DISCOVERY _IOW('p', 239, struct opal_discovery)
211#define IOC_OPAL_REVERT_LSP _IOW('p', 240, struct opal_revert_lsp)
201 212
202#endif /* _UAPI_SED_OPAL_H */213#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