All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCH 1/2] nvmet: handle admin default command set identifier
Date: Fri, 8 Apr 2022 07:45:16 +0200	[thread overview]
Message-ID: <20220408054516.GA32232@lst.de> (raw)
In-Reply-To: <20220408023930.85774-2-kch@nvidia.com>

On Thu, Apr 07, 2022 at 07:39:29PM -0700, Chaitanya Kulkarni wrote:
>  			switch (req->cmd->identify.csi) {
>  			case NVME_CSI_ZNS:
>  				return nvmet_execute_identify_cns_cs_ctrl(req);
> +			case NVME_CSI_NVM:
> +				return nvmet_execute_identify_ctrl(req);

This needs to return the "I/O Command Set Specific Identify Controller data
structure" defined in Figure 102 of the NVM Command specification

>  			default:
>  				break;
>  			}
> +		} else {
> +			switch (req->cmd->identify.csi) {
> +			case NVME_CSI_NVM:
> +				return nvmet_execute_identify_ctrl(req);
> +			}

And we should probably restructure the code like:

		switch (req->cmd->identify.csi) {
		case NVME_CSI_NVM:
			return nvmet_execute_identify_cns_cs_ctrl_nvm(ctrl);
		case NVME_CSI_ZNS:
			if (!IS_ENABLED(CONFIG_BLK_DEV_ZONED))
				break;
			return nvmet_execute_identify_cns_cs_ctrl_zns(ctrl);



  reply	other threads:[~2022-04-08  5:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  2:39 [PATCH 0/2] nvmet: handle missing cns and csi values Chaitanya Kulkarni
2022-04-08  2:39 ` [PATCH 1/2] nvmet: handle admin default command set identifier Chaitanya Kulkarni
2022-04-08  5:45   ` Christoph Hellwig [this message]
2022-04-08  2:39 ` [PATCH 2/2] nvmet: handle disc " Chaitanya Kulkarni
2022-04-08  5:45   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220408054516.GA32232@lst.de \
    --to=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.