summary refs log tree commit diff
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2012-04-03 23:41:37 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-04-25 08:57:02 +0100
commitf2ba02b89a1bfccb152302fa01651e21d98e9d1b (patch)
treeaa1b78f21073eb385ca37cb3dd848140e45c9568 /drivers/scsi/be2iscsi
parentdc63aac62de5851ad11e8bc5fa1cf8a7f4e586fb (diff)
downloadlinux-f2ba02b89a1bfccb152302fa01651e21d98e9d1b.tar.gz
[SCSI] be2iscsi: Fix in ASYNC PDU stitching logic.
The buffer length passed for processing the ASYNC PDU
was not proper.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 4765f47b612a..fef6f073c4ab 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -1655,7 +1655,7 @@ hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn,
 			}
 			memcpy(pfirst_buffer + offset,
 			       pasync_handle->pbuffer, buf_len);
-			offset = buf_len;
+			offset += buf_len;
 		}
 		index++;
 	}
@@ -1664,7 +1664,7 @@ hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn,
 					   (beiscsi_conn->beiscsi_conn_cid -
 					    phba->fw_config.iscsi_cid_start),
 					    phdr, hdr_len, pfirst_buffer,
-					    buf_len);
+					    offset);
 
 	if (status == 0)
 		hwi_free_async_msg(phba, cri);