diff options
author | Christoph Hellwig <hch@lst.de> | 2015-11-20 09:00:02 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-01 10:59:39 -0700 |
commit | 4160982e7594481d6b7f90aa693638a37d20ea17 (patch) | |
tree | 0733d082a3ae070cce2dfc407adacbc06a59b942 /drivers/nvme/host/nvme.h | |
parent | 22944e9981db1e496d983298fd420a8c6b758c80 (diff) | |
download | linux-4160982e7594481d6b7f90aa693638a37d20ea17.tar.bz2 |
nvme: split __nvme_submit_sync_cmd
Add a separate nvme_submit_user_cmd for commands that directly DMA
to or from userspace. We'll add metadata support to that soon and
the common version would become too messy.
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.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 641741252e62..0c1dc6394e6f 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -148,11 +148,15 @@ static inline int nvme_error_status(u16 status) } } +struct request *nvme_alloc_request(struct request_queue *q, + struct nvme_command *cmd, unsigned int flags); int nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, void *buf, unsigned bufflen); int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, - void *buffer, void __user *ubuffer, unsigned bufflen, - u32 *result, unsigned timeout); + void *buffer, unsigned bufflen, u32 *result, unsigned timeout); +int nvme_submit_user_cmd(struct request_queue *q, struct nvme_command *cmd, + void __user *ubuffer, unsigned bufflen, u32 *result, + unsigned timeout); int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id); int nvme_identify_ns(struct nvme_ctrl *dev, unsigned nsid, struct nvme_id_ns **id); |