]> git.proxmox.com Git - mirror_edk2.git/commitdiff
[Description]
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Mar 2008 08:35:18 +0000 (08:35 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Mar 2008 08:35:18 +0000 (08:35 +0000)
fix the wrote data corrupt bug about iscsi
[Impaction]
modify the IScsiGenerateDataOutPduSequence() function in MdeModulePkg.
[Reference Info]
when writing some data from local disk into remote iscsi disk, the data may be corrupt.The root cause is caused by the data out PDU's offset is not created correctly.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4843 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c

index 860755839791b833b3b5a0188fbb9fea3e27d025..3298b9576971e8bb74bdace749860cf453fec543 100644 (file)
@@ -2321,7 +2321,6 @@ Returns:
     // Determine the length of data this Data Out PDU can carry.\r
     //\r
     DataLen = MIN (XferContext->DesiredLength, Conn->MaxRecvDataSegmentLength);\r
-    Data += DataLen;\r
 \r
     //\r
     // Create a Data Out PDU.\r
@@ -2342,6 +2341,7 @@ Returns:
     XferContext->Offset += DataLen;\r
     XferContext->DesiredLength -= DataLen;\r
     DataSN++;\r
+    Data += DataLen;\r
   }\r
   //\r
   // Set the F bit for the last data out PDU in this sequence.\r