summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorChristoph Hellwig2015-11-28 15:37:52 +0100
committerJens Axboe2015-12-01 18:59:39 +0100
commit7fd8930f26be4c9078684b2fef14da0503771bf2 (patch)
treeab4847b46857510c32ae377f969c417856909309 /drivers/nvme/host/nvme.h
parentnvme: move nvme_{enable,disable,shutdown}_ctrl to common code (diff)
downloadkernel-qcow2-linux-7fd8930f26be4c9078684b2fef14da0503771bf2.tar.gz
kernel-qcow2-linux-7fd8930f26be4c9078684b2fef14da0503771bf2.tar.xz
kernel-qcow2-linux-7fd8930f26be4c9078684b2fef14da0503771bf2.zip
nvme: add a common helper to read Identify Controller data
And add the 64-bit register read operation for it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index b6c5a55ed59f..a624add7ca22 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -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,