linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chad Dupuis <chad.dupuis@qlogic.com>
To: James.Bottomley@HansenPartnership.com
Cc: giridhar.malavali@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 3/7] bnx2fc: Set ELS transfer length correctly for middle path commands.
Date: Mon, 19 Oct 2015 15:40:37 -0400	[thread overview]
Message-ID: <1445283641-7358-4-git-send-email-chad.dupuis@qlogic.com> (raw)
In-Reply-To: <1445283641-7358-1-git-send-email-chad.dupuis@qlogic.com>

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/bnx2fc/bnx2fc_els.c |    1 +
 drivers/scsi/bnx2fc/bnx2fc_io.c  |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index 49d1e4d..0d0ab2e 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -707,6 +707,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
 	els_req->cb_func = cb_func;
 	cb_arg->io_req = els_req;
 	els_req->cb_arg = cb_arg;
+	els_req->data_xfer_len = data_len;
 
 	mp_req = (struct bnx2fc_mp_req *)&(els_req->mp_req);
 	rc = bnx2fc_init_mp_req(els_req);
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 520dabe..5d6a81b 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -623,8 +623,12 @@ int bnx2fc_init_mp_req(struct bnx2fc_cmd *io_req)
 	mp_req = (struct bnx2fc_mp_req *)&(io_req->mp_req);
 	memset(mp_req, 0, sizeof(struct bnx2fc_mp_req));
 
-	mp_req->req_len = sizeof(struct fcp_cmnd);
-	io_req->data_xfer_len = mp_req->req_len;
+	if (io_req->cmd_type != BNX2FC_ELS) {
+		mp_req->req_len = sizeof(struct fcp_cmnd);
+		io_req->data_xfer_len = mp_req->req_len;
+	} else
+		mp_req->req_len = io_req->data_xfer_len; 
+
 	mp_req->req_buf = dma_alloc_coherent(&hba->pcidev->dev, CNIC_PAGE_SIZE,
 					     &mp_req->req_buf_dma,
 					     GFP_ATOMIC);
-- 
1.7.7


  parent reply	other threads:[~2015-10-19 20:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 19:40 [PATCH 0/7] bnx2fc: Update to version 2.9.6 Chad Dupuis
2015-10-19 19:40 ` [PATCH 1/7] bnx2fc: Update copyright for 2015 Chad Dupuis
2015-10-21 10:19   ` Hannes Reinecke
2015-10-22 14:50   ` Tomas Henzl
2015-10-19 19:40 ` [PATCH 2/7] bnx2fc: Remove 'NetXtreme II' from source files Chad Dupuis
2015-10-21 10:22   ` Hannes Reinecke
2015-10-22 14:50   ` Tomas Henzl
2015-10-19 19:40 ` Chad Dupuis [this message]
2015-10-21 10:23   ` [PATCH 3/7] bnx2fc: Set ELS transfer length correctly for middle path commands Hannes Reinecke
2015-10-22 14:53   ` Tomas Henzl
2015-10-19 19:40 ` [PATCH 4/7] bnx2fc: Fix FCP RSP residual parsing Chad Dupuis
2015-10-21 10:23   ` Hannes Reinecke
2015-10-22 14:54   ` Tomas Henzl
2015-10-19 19:40 ` [PATCH 5/7] bnx2fc: Remove explicit logouts Chad Dupuis
2015-10-21 10:30   ` Hannes Reinecke
2015-10-22 14:54   ` Tomas Henzl
2015-10-19 19:40 ` [PATCH 6/7] bnx2fc: Add HZ to task management timeout Chad Dupuis
2015-10-20 11:47   ` Tomas Henzl
2015-10-20 14:17     ` Chad Dupuis
2015-10-21 10:30   ` Hannes Reinecke
2015-10-19 19:40 ` [PATCH 7/7] bnx2fc: Update version number to 2.9.6 Chad Dupuis
2015-10-21 10:31   ` Hannes Reinecke
2015-10-22 14:55   ` Tomas Henzl

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=1445283641-7358-4-git-send-email-chad.dupuis@qlogic.com \
    --to=chad.dupuis@qlogic.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).