nvme-core: use macro for identify size
Subsystems (2)
PATCH 1/2 nvme-core: use macro for identify size
Use identifier macro for identify data structure size.
--- drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/core.c +2 -1
@@ -948,7 +948,8 @@ static int nvme_identify_ns_list(struct nvme_ctrl *dev, unsigned nsid, __le32 *n c.identify.opcode = nvme_admin_identify; c.identify.cns =NVME_ID_CNS_NS_ACTIVE_LIST ; c.identify.nsid =cpu_to_le32 (nsid); -return nvme_submit_sync_cmd (dev->admin_q, &c, ns_list,0x1000 ); +return nvme_submit_sync_cmd (dev->admin_q, &c, ns_list, +NVME_IDENTIFY_DATA_SIZE ); } static struct nvme_id_ns *nvme_identify_ns(struct nvme_ctrl *ctrl,
Signature · 1 line
2.9.5
PATCH 2/2 nvmet: make the error message more generic
nvmet_check_ctrl_status() is called from admin-cmd.c along with io-cmd.c, make the error message more generic.
--- drivers/nvme/target/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/target/core.c +2 -2
@@ -710,13 +710,13 @@ u16 nvmet_ctrl_find_get(const char *subsysnqn, const char *hostnqn, u16 cntlid,u16 nvmet_check_ctrl_status (struct nvmet_req *req,struct nvme_command *cmd) {if (unlikely (!(req->sq->ctrl->cc &NVME_CC_ENABLE ))) { -pr_err ("got io cmd %d while CC.EN == 0 on qid = %d\n" , +pr_err ("got cmd %d while CC.EN == 0 on qid = %d\n" , cmd->common.opcode, req->sq->qid);return NVME_SC_CMD_SEQ_ERROR |NVME_SC_DNR ; }if (unlikely (!(req->sq->ctrl->csts &NVME_CSTS_RDY ))) { -pr_err ("got io cmd %d while CSTS.RDY == 0 on qid = %d\n" , +pr_err ("got cmd %d while CSTS.RDY == 0 on qid = %d\n" , cmd->common.opcode, req->sq->qid); req->ns =NULL ;return NVME_SC_CMD_SEQ_ERROR |NVME_SC_DNR ;
Signature · 1 line
2.9.5
PATCH 2/2 nvmet: make the error message more generic
Oops, missing sign-off will resend this patch.
Quoted 34 lines · Chaitanya Kulkarni
nvmet_check_ctrl_status()is called fromadmin-cmd.calong withio-cmd.c, make the error message more generic.--- drivers/nvme/target/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/nvme/target/core.c +2
-3@@ -710,13 +710,13 @@ u16 nvmet_ctrl_find_get(const char *subsysnqn, const char *hostnqn, u16 cntlid,u16 nvmet_check_ctrl_status (struct nvmet_req *req,struct nvme_command *cmd) {if (unlikely (!(req->sq->ctrl->cc &NVME_CC_ENABLE ))) { -pr_err ("got io cmd %d while CC.EN == 0 on qid = %d\n" , +pr_err ("got cmd %d while CC.EN == 0 on qid = %d\n" , cmd->common.opcode, req->sq->qid);return NVME_SC_CMD_SEQ_ERROR |NVME_SC_DNR ; }if (unlikely (!(req->sq->ctrl->csts &NVME_CSTS_RDY ))) { -pr_err ("got io cmd %d while CSTS.RDY == 0 on qid = %d\n" , +pr_err ("got cmd %d while CSTS.RDY == 0 on qid = %d\n" , cmd->common.opcode, req->sq->qid); req->ns =NULL ;return NVME_SC_CMD_SEQ_ERROR |NVME_SC_DNR ; --2.9.5
_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 1/2 nvme-core: use macro for identify size
In reply to Chaitanya KulkarniQuoted 3 lines · Chaitanya Kulkarni
Use identifier macro for identify data structure size.
Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Looks good,
PATCH 1/2 nvme-core: use macro for identify size
In reply to Chaitanya KulkarniQuoted 3 lines · Chaitanya Kulkarni
Use identifier macro for identify data structure size.
Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
The same update is staged for upstream here: