From: james_p_freyensee@linux.intel.com (J Freyensee)
Subject: [PATCH] nvmet: discovery controller to set ioccsz and iorcsz
Date: Tue, 21 Feb 2017 12:36:24 -0800 [thread overview]
Message-ID: <1487709384.3502.20.camel@linux.intel.com> (raw)
In-Reply-To: <58a65552.zF6EjNdRTHBlXYtH%jsmart2021@gmail.com>
On Thu, 2017-02-16@17:43 -0800, James Smart wrote:
> The discovery controller's Identify command handler never set these
> fields leaving them zero. The host-side fc transport validates that
> these values are appropriate and was killing the connection with the
> controller as they were zero.
>
> Change them to the minimal SQE and CQE size values.
Looks good to me.
Reviewed-by: Jay Freyensee <james_p_freyensee at linux.intel.com>
>
> -- james
>
> Signed-off-by: James Smart <james.smart at broadcom.com>
> ---
> ?drivers/nvme/target/discovery.c | 5 +++++
> ?1 file changed, 5 insertions(+)
>
> diff --git a/drivers/nvme/target/discovery.c
> b/drivers/nvme/target/discovery.c
> index 12f39ee..6adb9e9 100644
> --- a/drivers/nvme/target/discovery.c
> +++ b/drivers/nvme/target/discovery.c
> @@ -152,6 +152,11 @@ static void nvmet_execute_identify_disc_ctrl(struct
> nvmet_req *req)
> ?
> ? strcpy(id->subnqn, ctrl->subsys->subsysnqn);
> ?
> + /* Max command capsule size is sqe */
> + id->ioccsz = cpu_to_le32(sizeof(struct nvme_command) / 16);
> + /* Max response capsule size is cqe */
> + id->iorcsz = cpu_to_le32(sizeof(struct nvme_completion) / 16);
> +
> ? status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));
> ?
> ? kfree(id);
next prev parent reply other threads:[~2017-02-21 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 1:43 [PATCH] nvmet: discovery controller to set ioccsz and iorcsz James Smart
2017-02-21 20:36 ` J Freyensee [this message]
2017-02-21 20:37 ` J Freyensee
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=1487709384.3502.20.camel@linux.intel.com \
--to=james_p_freyensee@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox