[SCSI] be2iscsi: Fix in ASYNC PDU stitching logic.
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Wed, 4 Apr 2012 04:41:37 +0000 (23:41 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 25 Apr 2012 07:57:02 +0000 (08:57 +0100)
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>
drivers/scsi/be2iscsi/be_main.c

index 4765f47b612a711e7d81db6b36589ce44e62ce82..fef6f073c4ab90a6de2e833ac045e485db8c6880 100644 (file)
@@ -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);