aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/admin-cmd.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2018-12-12 15:11:37 -0800
committerChristoph Hellwig <hch@lst.de>2018-12-13 09:59:01 +0100
commitb7c8f3663d0e0773aca3324c26bce3ca8343ec14 (patch)
tree7969861c5bb4644247f5f664d417a17457a38538 /drivers/nvme/target/admin-cmd.c
parentnvmet: remove unused variable (diff)
downloadlinux-dev-b7c8f3663d0e0773aca3324c26bce3ca8343ec14.tar.xz
linux-dev-b7c8f3663d0e0773aca3324c26bce3ca8343ec14.zip
nvme: remove nvme_common command cdw10 array
This is a preparation patch which removes the nvme common command cdw10 array and replace with individual fields. This is needed for the nvmet error log page implementation make is error log page entry offset assignment easier. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/target/admin-cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 753515fc8028..721b041a6b3b 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -557,7 +557,7 @@ static u16 nvmet_write_protect_flush_sync(struct nvmet_req *req)
static u16 nvmet_set_feat_write_protect(struct nvmet_req *req)
{
- u32 write_protect = le32_to_cpu(req->cmd->common.cdw10[1]);
+ u32 write_protect = le32_to_cpu(req->cmd->common.cdw11);
struct nvmet_subsys *subsys = req->sq->ctrl->subsys;
u16 status = NVME_SC_FEATURE_NOT_CHANGEABLE;
@@ -589,7 +589,7 @@ static u16 nvmet_set_feat_write_protect(struct nvmet_req *req)
u16 nvmet_set_feat_kato(struct nvmet_req *req)
{
- u32 val32 = le32_to_cpu(req->cmd->common.cdw10[1]);
+ u32 val32 = le32_to_cpu(req->cmd->common.cdw11);
req->sq->ctrl->kato = DIV_ROUND_UP(val32, 1000);
@@ -600,7 +600,7 @@ u16 nvmet_set_feat_kato(struct nvmet_req *req)
u16 nvmet_set_feat_async_event(struct nvmet_req *req, u32 mask)
{
- u32 val32 = le32_to_cpu(req->cmd->common.cdw10[1]);
+ u32 val32 = le32_to_cpu(req->cmd->common.cdw11);
if (val32 & ~mask)
return NVME_SC_INVALID_FIELD | NVME_SC_DNR;
@@ -614,7 +614,7 @@ u16 nvmet_set_feat_async_event(struct nvmet_req *req, u32 mask)
static void nvmet_execute_set_features(struct nvmet_req *req)
{
struct nvmet_subsys *subsys = req->sq->ctrl->subsys;
- u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10[0]);
+ u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10);
u16 status = 0;
switch (cdw10 & 0xff) {
@@ -675,7 +675,7 @@ void nvmet_get_feat_async_event(struct nvmet_req *req)
static void nvmet_execute_get_features(struct nvmet_req *req)
{
struct nvmet_subsys *subsys = req->sq->ctrl->subsys;
- u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10[0]);
+ u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10);
u16 status = 0;
switch (cdw10 & 0xff) {
@@ -715,7 +715,7 @@ static void nvmet_execute_get_features(struct nvmet_req *req)
break;
case NVME_FEAT_HOST_ID:
/* need 128-bit host identifier flag */
- if (!(req->cmd->common.cdw10[1] & cpu_to_le32(1 << 0))) {
+ if (!(req->cmd->common.cdw11 & cpu_to_le32(1 << 0))) {
status = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
break;
}