summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_io.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2015-10-19 21:40:37 +0200
committerJames Bottomley <JBottomley@Odin.com>2015-11-10 02:30:03 +0100
commit1fffa19991b5a907303ca3f09cf3d8e91b0bd911 (patch)
tree7a8e7f328c5e1e065a349afafb3af79bce7e97f6 /drivers/scsi/bnx2fc/bnx2fc_io.c
parentbnx2fc: Remove 'NetXtreme II' from source files. (diff)
downloadlinux-1fffa19991b5a907303ca3f09cf3d8e91b0bd911.tar.xz
linux-1fffa19991b5a907303ca3f09cf3d8e91b0bd911.zip
bnx2fc: Set ELS transfer length correctly for middle path commands.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_io.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 520dabecc90b..30916fd3a9f0 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);