Revision: 19450
http://sourceforge.net/p/edk2/code/19450
Author: hwu1225
Date: 2015-12-22 13:56:54 +0000 (Tue, 22 Dec 2015)
Log Message:
-----------
MdeModulePkg ScsiDiskDxe: Fix async request retry times info lost issue
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
Modified: trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c 2015-12-22
13:56:30 UTC (rev 19449)
+++ trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c 2015-12-22
13:56:54 UTC (rev 19450)
@@ -2692,6 +2692,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
(UINT32) Lba,
@@ -2703,6 +2704,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
Lba,
@@ -2853,6 +2855,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
(UINT32) Lba,
@@ -2864,6 +2867,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Timeout,
+ 0,
PtrBuffer,
ByteCount,
Lba,
@@ -3527,6 +3531,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->InBuffer,
Request->DataLength,
(UINT32) Request->StartLba,
@@ -3538,6 +3543,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->InBuffer,
Request->DataLength,
Request->StartLba,
@@ -3559,6 +3565,7 @@
Status = ScsiDiskAsyncRead10 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->InBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
(UINT32) Request->StartLba + Request->SectorCount,
@@ -3570,6 +3577,7 @@
Status = ScsiDiskAsyncRead16 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->InBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
Request->StartLba + Request->SectorCount,
@@ -3591,6 +3599,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->OutBuffer,
Request->DataLength,
(UINT32) Request->StartLba,
@@ -3602,6 +3611,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Request->Timeout,
+ Request->TimesRetry,
Request->OutBuffer,
Request->DataLength,
Request->StartLba,
@@ -3623,6 +3633,7 @@
Status = ScsiDiskAsyncWrite10 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->OutBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
(UINT32) Request->StartLba + Request->SectorCount,
@@ -3634,6 +3645,7 @@
Status = ScsiDiskAsyncWrite16 (
ScsiDiskDevice,
Request->Timeout,
+ 0,
Request->OutBuffer + Request->SectorCount *
ScsiDiskDevice->BlkIo.Media->BlockSize,
OldDataLength - Request->DataLength,
Request->StartLba + Request->SectorCount,
@@ -3670,6 +3682,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.
@@ -3688,6 +3701,7 @@
ScsiDiskAsyncRead10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -3717,6 +3731,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->InBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3779,6 +3794,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.
@@ -3797,6 +3813,7 @@
ScsiDiskAsyncWrite10 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT32 StartLba,
@@ -3826,6 +3843,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->OutBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3888,6 +3906,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.
@@ -3906,6 +3925,7 @@
ScsiDiskAsyncRead16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
OUT UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
@@ -3935,6 +3955,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->InBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
@@ -3997,6 +4018,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.
@@ -4015,6 +4037,7 @@
ScsiDiskAsyncWrite16 (
IN SCSI_DISK_DEV *ScsiDiskDevice,
IN UINT64 Timeout,
+ IN UINT8 TimesRetry,
IN UINT8 *DataBuffer,
IN UINT32 DataLength,
IN UINT64 StartLba,
@@ -4044,6 +4067,7 @@
Request->ScsiDiskDevice = ScsiDiskDevice;
Request->Timeout = Timeout;
+ Request->TimesRetry = TimesRetry;
Request->OutBuffer = DataBuffer;
Request->DataLength = DataLength;
Request->StartLba = StartLba;
Modified: trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h 2015-12-22
13:56:30 UTC (rev 19449)
+++ trunk/edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h 2015-12-22
13:56:54 UTC (rev 19450)
@@ -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