]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/nvme/host/nvme.h
Merge branch 'for-4.11/block' into for-4.11/linus-merge
[karo-tx-linux.git] / drivers / nvme / host / nvme.h
index aead6d08ed2c83b4f67e9087b0ca446247b57d18..14cfc6f7facb240a96630a637ccc60bd45911302 100644 (file)
@@ -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];
@@ -137,6 +140,7 @@ struct nvme_ctrl {
        u32 max_hw_sectors;
        u16 oncs;
        u16 vid;
+       u16 oacs;
        atomic_t abort_limit;
        u8 event_limit;
        u8 vwc;
@@ -267,6 +271,9 @@ int nvme_init_identify(struct nvme_ctrl *ctrl);
 void nvme_queue_scan(struct nvme_ctrl *ctrl);
 void nvme_remove_namespaces(struct nvme_ctrl *ctrl);
 
+int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
+               bool send);
+
 #define NVME_NR_AERS   1
 void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
                union nvme_result *res);
@@ -318,6 +325,7 @@ int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node);
 void nvme_nvm_unregister(struct nvme_ns *ns);
 int nvme_nvm_register_sysfs(struct nvme_ns *ns);
 void nvme_nvm_unregister_sysfs(struct nvme_ns *ns);
+int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd, unsigned long arg);
 #else
 static inline int nvme_nvm_register(struct nvme_ns *ns, char *disk_name,
                                    int node)
@@ -335,6 +343,11 @@ static inline int nvme_nvm_ns_supported(struct nvme_ns *ns, struct nvme_id_ns *i
 {
        return 0;
 }
+static inline int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd,
+                                                       unsigned long arg)
+{
+       return -ENOTTY;
+}
 #endif /* CONFIG_NVM */
 
 static inline struct nvme_ns *nvme_get_ns_from_dev(struct device *dev)