diff options
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 330713c4abdb..1aa353a848e3 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -19,6 +19,7 @@ #include <linux/kref.h> #include <linux/blk-mq.h> #include <linux/lightnvm.h> +#include <linux/sed-opal.h> enum { /* @@ -125,6 +126,8 @@ struct nvme_ctrl { struct list_head node; struct ida ns_ida; + struct opal_dev opal_dev; + char name[12]; char serial[20]; char model[40]; @@ -275,6 +278,17 @@ int nvme_init_identify(struct nvme_ctrl *ctrl); void nvme_queue_scan(struct nvme_ctrl *ctrl); void nvme_remove_namespaces(struct nvme_ctrl *ctrl); +#ifdef CONFIG_BLK_SED_OPAL +int nvme_sec_submit(struct opal_dev *dev, u16 spsp, u8 secp, + void *buffer, size_t len, bool send); +#else +static inline int nvme_sec_submit(struct opal_dev *dev, u16 spsp, u8 secp, + void *buffer, size_t len, bool send) +{ + return 0; +} +#endif /* CONFIG_BLK_DEV_SED_OPAL */ + #define NVME_NR_AERS 1 void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status, union nvme_result *res); |