Thread (4 messages) 4 messages, 3 authors, 2020-03-01

Re: [PATCH] nvmet: return Invalid Field error on set features cmd fid 07h

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2020-02-28 20:33:46

quoted hunk ↗ jump to hunk
From: Amit Engel <redacted>

If the value specified in NCQR and NSQR fields (0's based) is 65,535
the controller should return an error of Invalid field in command

Signed-off-by: Amit Engel <redacted>
---
  drivers/nvme/target/admin-cmd.c | 7 +++++++
  1 file changed, 7 insertions(+)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 19f949570625..94b0ac923e99 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -733,6 +733,9 @@ 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);
+	u32 cdw11 = le32_to_cpu(req->cmd->common.cdw11);
+	u16 ncqr = (cdw11 >> 16) & 0xffff;
+	u16 nsqr = cdw11 & 0xffff;
I meant that here we only declare, assignment should go to where these
are used.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help