]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/nvme/host/nvme.h
nvme: add a common helper to read Identify Controller data
[mirror_ubuntu-bionic-kernel.git] / drivers / nvme / host / nvme.h
index b6c5a55ed59fee0f0aa17275d6ccb410f67e28eb..a624add7ca2201c2f4eb9edbdb8abc955628d7e9 100644 (file)
@@ -62,6 +62,8 @@ struct nvme_ctrl {
        u32 ctrl_config;
 
        u32 page_size;
+       u32 max_hw_sectors;
+       u32 stripe_size;
        u16 oncs;
        u16 abort_limit;
        u8 event_limit;
@@ -93,6 +95,7 @@ struct nvme_ns {
 struct nvme_ctrl_ops {
        int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val);
        int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val);
+       int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val);
        void (*free_ctrl)(struct nvme_ctrl *ctrl);
 };
 
@@ -177,6 +180,7 @@ int nvme_disable_ctrl(struct nvme_ctrl *ctrl, u64 cap);
 int nvme_enable_ctrl(struct nvme_ctrl *ctrl, u64 cap);
 int nvme_shutdown_ctrl(struct nvme_ctrl *ctrl);
 void nvme_put_ctrl(struct nvme_ctrl *ctrl);
+int nvme_init_identify(struct nvme_ctrl *ctrl);
 void nvme_put_ns(struct nvme_ns *ns);
 
 struct request *nvme_alloc_request(struct request_queue *q,