Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-core: use macro for identify size
@ 2018-03-24 20:32 Chaitanya Kulkarni
  2018-03-24 20:32 ` [PATCH 2/2] nvmet: make the error message more generic Chaitanya Kulkarni
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2018-03-24 20:32 UTC (permalink / raw)


Use identifier macro for identify data structure size.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 drivers/nvme/host/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 7aeca5d..3ef1129 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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,
-- 
2.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] nvmet: make the error message more generic
  2018-03-24 20:32 [PATCH 1/2] nvme-core: use macro for identify size Chaitanya Kulkarni
@ 2018-03-24 20:32 ` Chaitanya Kulkarni
  2018-03-26  2:15   ` chaitany kulkarni
  2018-03-28  8:32 ` [PATCH 1/2] nvme-core: use macro for identify size Christoph Hellwig
  2018-03-28 14:58 ` Keith Busch
  2 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2018-03-24 20:32 UTC (permalink / raw)


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(-)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index a78029e..841e55a 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] nvmet: make the error message more generic
  2018-03-24 20:32 ` [PATCH 2/2] nvmet: make the error message more generic Chaitanya Kulkarni
@ 2018-03-26  2:15   ` chaitany kulkarni
  0 siblings, 0 replies; 5+ messages in thread
From: chaitany kulkarni @ 2018-03-26  2:15 UTC (permalink / raw)


Oops, missing sign-off will resend this patch.

On Sat, Mar 24, 2018 at 1:32 PM, Chaitanya Kulkarni
<chaitanya.kulkarni@wdc.com> wrote:
> 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(-)
>
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index a78029e..841e55a 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] nvme-core: use macro for identify size
  2018-03-24 20:32 [PATCH 1/2] nvme-core: use macro for identify size Chaitanya Kulkarni
  2018-03-24 20:32 ` [PATCH 2/2] nvmet: make the error message more generic Chaitanya Kulkarni
@ 2018-03-28  8:32 ` Christoph Hellwig
  2018-03-28 14:58 ` Keith Busch
  2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2018-03-28  8:32 UTC (permalink / raw)


On Sat, Mar 24, 2018@01:32:00PM -0700, Chaitanya Kulkarni wrote:
> Use identifier macro for identify data structure size.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch at lst.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] nvme-core: use macro for identify size
  2018-03-24 20:32 [PATCH 1/2] nvme-core: use macro for identify size Chaitanya Kulkarni
  2018-03-24 20:32 ` [PATCH 2/2] nvmet: make the error message more generic Chaitanya Kulkarni
  2018-03-28  8:32 ` [PATCH 1/2] nvme-core: use macro for identify size Christoph Hellwig
@ 2018-03-28 14:58 ` Keith Busch
  2 siblings, 0 replies; 5+ messages in thread
From: Keith Busch @ 2018-03-28 14:58 UTC (permalink / raw)


On Sat, Mar 24, 2018@01:32:00PM -0700, Chaitanya Kulkarni wrote:
> 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:

  https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit?id=42595eb7d0095897823b89344e497b69d08d91c1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-28 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-24 20:32 [PATCH 1/2] nvme-core: use macro for identify size Chaitanya Kulkarni
2018-03-24 20:32 ` [PATCH 2/2] nvmet: make the error message more generic Chaitanya Kulkarni
2018-03-26  2:15   ` chaitany kulkarni
2018-03-28  8:32 ` [PATCH 1/2] nvme-core: use macro for identify size Christoph Hellwig
2018-03-28 14:58 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox