Revision: 19471
http://sourceforge.net/p/edk2/code/19471
Author: hwu1225
Date: 2015-12-23 01:37:00 +0000 (Wed, 23 Dec 2015)
Log Message:
-----------
MdeModulePkg ScsiDiskDxe: Fix async request retry times info lost issue
(Sync patch r19450 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/19450
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
Modified: branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
===================================================================
--- branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
2015-12-23 01:36:31 UTC (rev 19470)
+++ branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
2015-12-23 01:37:00 UTC (rev 19471)
@@ -2651,6 +2651,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
(UINT32) Lba,
@@ -2662,6 +2663,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
Lba,
@@ -2812,6 +2814,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
(UINT32) Lba,
@@ -2823,6 +2826,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
Lba,
@@ -3486,6 +3490,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->InBuffer,
Request->DataLength,
(UINT32) Request->StartLba,
@@ -3497,6 +3502,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->InBuffer,
Request->DataLength,
Request->StartLba,
@@ -3518,6 +3524,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->InBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
(UINT32) Request->StartLba + Request->SectorCount,
@@ -3529,6 +3536,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->InBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
Request->StartLba + Request->SectorCount,
@@ -3550,6 +3558,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->OutBuffer,
Request->DataLength,
(UINT32) Request->StartLba,
@@ -3561,6 +3570,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->OutBuffer,
Request->DataLength,
Request->StartLba,
@@ -3582,6 +3592,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->OutBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
(UINT32) Request->StartLba + Request->SectorCount,
@@ -3593,6 +3604,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->OutBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
Request->StartLba + Request->SectorCount,
@@ -3629,6 +3641,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer to fill with the read out data.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -3647,6 +3660,7 @@
ScsiDiskAsyncRead10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -3676,6 +3690,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->InBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3738,6 +3753,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer contains the data to write.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -3756,6 +3772,7 @@
ScsiDiskAsyncWrite10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -3785,6 +3802,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->OutBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3847,6 +3865,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer to fill with the read out data.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -3865,6 +3884,7 @@
ScsiDiskAsyncRead16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
@@ -3894,6 +3914,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->InBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3956,6 +3977,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer contains the data to write.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -3974,6 +3996,7 @@
ScsiDiskAsyncWrite16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
@@ -4003,6 +4026,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->OutBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
Modified: branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
===================================================================
--- branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
2015-12-23 01:36:31 UTC (rev 19470)
+++ branches/UDK2015/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
2015-12-23 01:37:00 UTC (rev 19471)
@@ -1029,6 +1029,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer to fill with the read out data.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -1047,6 +1048,7 @@
ScsiDiskAsyncRead10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -1060,6 +1062,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer contains the data to write.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -1078,6 +1081,7 @@
ScsiDiskAsyncWrite10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -1091,6 +1095,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer to fill with the read out data.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -1109,6 +1114,7 @@
ScsiDiskAsyncRead16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
@@ -1122,6 +1128,7 @@
@param ScsiDiskDevice The pointer of ScsiDiskDevice.
@param Timeout The time to complete the command.
+ @param TimesRetry The number of times the command has been retried.
@param DataBuffer The buffer contains the data to write.
@param DataLength The length of buffer.
@param StartLba The start logic block address.
@@ -1140,6 +1147,7 @@
ScsiDiskAsyncWrite16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits