summaryrefslogtreecommitdiff
path: root/include/uapi/linux/sed-opal.h
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2026-02-06 15:17:58 +0100
committerJens Axboe <axboe@kernel.dk>2026-03-09 14:29:59 -0600
commitaca086ff27c3f67e81617e4b063d1126544a4f19 (patch)
treee11efb1aa81a00bbbf7d857fab33ea4c80b559ce /include/uapi/linux/sed-opal.h
parentc6c9dc91cb5fd30d2e11e7f2ae570e614b013ee1 (diff)
downloadlwn-aca086ff27c3f67e81617e4b063d1126544a4f19.tar.gz
lwn-aca086ff27c3f67e81617e4b063d1126544a4f19.zip
sed-opal: add IOC_OPAL_REACTIVATE_LSP.
This adds the 'Reactivate' method as described in the "TCG Storage Opal SSC Feature Set: Single User Mode" document (ch. 3.1.1.1). The method enables switching an already active SED OPAL2 device, with appropriate firmware support for Single User Mode (SUM), to or from SUM. Signed-off-by: Ondrej Kozina <okozina@redhat.com> Reviewed-and-tested-by: Milan Broz <gmazyland@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/sed-opal.h')
-rw-r--r--include/uapi/linux/sed-opal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/linux/sed-opal.h b/include/uapi/linux/sed-opal.h
index 9025dd5a4f0f..d03e590b6501 100644
--- a/include/uapi/linux/sed-opal.h
+++ b/include/uapi/linux/sed-opal.h
@@ -74,6 +74,19 @@ struct opal_lr_act {
__u8 align[2]; /* Align to 8 byte boundary */
};
+struct opal_lr_react {
+ struct opal_key key;
+ struct opal_key new_admin_key; /* Set new Admin1 PIN if key_len is > 0 */
+ __u8 num_lrs; /*
+ * Configure selected ranges (from lr[]) in SUM.
+ * If num_lrs > 0 the 'entire_table' must be 0
+ */
+ __u8 lr[OPAL_MAX_LRS];
+ __u8 range_policy; /* Set RangeStartRangeLengthPolicy parameter */
+ __u8 entire_table; /* Set all locking objects in SUM */
+ __u8 align[4]; /* Align to 8 byte boundary */
+};
+
struct opal_session_info {
__u32 sum;
__u32 who;
@@ -216,5 +229,6 @@ struct opal_revert_lsp {
#define IOC_OPAL_DISCOVERY _IOW('p', 239, struct opal_discovery)
#define IOC_OPAL_REVERT_LSP _IOW('p', 240, struct opal_revert_lsp)
#define IOC_OPAL_SET_SID_PW _IOW('p', 241, struct opal_new_pw)
+#define IOC_OPAL_REACTIVATE_LSP _IOW('p', 242, struct opal_lr_react)
#endif /* _UAPI_SED_OPAL_H */