Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH] nvme-fc: Zero out SGL before submitting AEN
Date: Fri, 27 Oct 2017 09:16:17 +0200	[thread overview]
Message-ID: <1509088577-7342-1-git-send-email-hare@suse.de> (raw)

nvme_fc_start_fc_op() will be updating the SGL entries of the
sqe, so we need to zero those before resubmitting a received
AEN. Otherwise we trigger the WARN_ON() in nvme_fc_start_fc_op().

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/fc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index b600c07..db0a7f6 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2181,6 +2181,7 @@ enum {
 {
 	struct nvme_fc_ctrl *ctrl = to_fc_ctrl(arg);
 	struct nvme_fc_fcp_op *aen_op;
+	struct nvme_command *sqe;
 	unsigned long flags;
 	bool terminating = false;
 	blk_status_t ret;
@@ -2197,6 +2198,8 @@ enum {
 		return;
 
 	aen_op = &ctrl->aen_ops[aer_idx];
+	sqe = &aen_op->cmd_iu.sqe;
+	memset(&sqe->common.dptr, 0, sizeof(union nvme_data_ptr));
 
 	ret = nvme_fc_start_fcp_op(ctrl, aen_op->queue, aen_op, 0,
 					NVMEFC_FCP_NODATA);
-- 
1.8.5.6

             reply	other threads:[~2017-10-27  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  7:16 Hannes Reinecke [this message]
2017-10-27 17:47 ` [PATCH] nvme-fc: Zero out SGL before submitting AEN James Smart

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=1509088577-7342-1-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    /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