mirror of https://github.com/acidanthera/audk.git
Update SCSI modules to use new macros defined in UefiLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6564 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
52ca0d9816
commit
e72a3b3ea8
|
@ -1105,7 +1105,7 @@ DiscoverScsiDevice (
|
||||||
|
|
||||||
Status = ScsiInquiryCommand (
|
Status = ScsiInquiryCommand (
|
||||||
&ScsiIoDevice->ScsiIo,
|
&ScsiIoDevice->ScsiIo,
|
||||||
EFI_SCSI_STALL_SECONDS (1),
|
EFI_TIMER_PERIOD_SECONDS (1),
|
||||||
(VOID *) &SenseData,
|
(VOID *) &SenseData,
|
||||||
&SenseDataLength,
|
&SenseDataLength,
|
||||||
&HostAdapterStatus,
|
&HostAdapterStatus,
|
||||||
|
|
|
@ -35,10 +35,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
|
|
||||||
#include <IndustryStandard/Scsi.h>
|
#include <IndustryStandard/Scsi.h>
|
||||||
//
|
|
||||||
// 1000 * 1000 * 10
|
|
||||||
//
|
|
||||||
#define ONE_SECOND_TIMER 10000000
|
|
||||||
|
|
||||||
#define SCSI_IO_DEV_SIGNATURE EFI_SIGNATURE_32 ('s', 'c', 'i', 'o')
|
#define SCSI_IO_DEV_SIGNATURE EFI_SIGNATURE_32 ('s', 'c', 'i', 'o')
|
||||||
|
|
||||||
|
|
|
@ -876,7 +876,7 @@ ScsiDiskInquiryDevice (
|
||||||
|
|
||||||
Status = ScsiInquiryCommand (
|
Status = ScsiInquiryCommand (
|
||||||
ScsiDiskDevice->ScsiIo,
|
ScsiDiskDevice->ScsiIo,
|
||||||
EFI_SCSI_STALL_SECONDS (1),
|
EFI_TIMER_PERIOD_SECONDS (1),
|
||||||
NULL,
|
NULL,
|
||||||
&SenseDataLength,
|
&SenseDataLength,
|
||||||
&HostAdapterStatus,
|
&HostAdapterStatus,
|
||||||
|
@ -1002,7 +1002,7 @@ ScsiDiskTestUnitReady (
|
||||||
//
|
//
|
||||||
Status = ScsiTestUnitReadyCommand (
|
Status = ScsiTestUnitReadyCommand (
|
||||||
ScsiDiskDevice->ScsiIo,
|
ScsiDiskDevice->ScsiIo,
|
||||||
EFI_SCSI_STALL_SECONDS (1),
|
EFI_TIMER_PERIOD_SECONDS (1),
|
||||||
NULL,
|
NULL,
|
||||||
&SenseDataLength,
|
&SenseDataLength,
|
||||||
&HostAdapterStatus,
|
&HostAdapterStatus,
|
||||||
|
@ -1192,7 +1192,7 @@ ScsiDiskReadCapacity (
|
||||||
//
|
//
|
||||||
CommandStatus = ScsiReadCapacityCommand (
|
CommandStatus = ScsiReadCapacityCommand (
|
||||||
ScsiDiskDevice->ScsiIo,
|
ScsiDiskDevice->ScsiIo,
|
||||||
EFI_SCSI_STALL_SECONDS (1),
|
EFI_TIMER_PERIOD_SECONDS (1),
|
||||||
NULL,
|
NULL,
|
||||||
&SenseDataLength,
|
&SenseDataLength,
|
||||||
&HostAdapterStatus,
|
&HostAdapterStatus,
|
||||||
|
@ -1409,7 +1409,7 @@ ScsiDiskRequestSenseKeys (
|
||||||
for (SenseReq = TRUE; SenseReq;) {
|
for (SenseReq = TRUE; SenseReq;) {
|
||||||
Status = ScsiRequestSenseCommand (
|
Status = ScsiRequestSenseCommand (
|
||||||
ScsiDiskDevice->ScsiIo,
|
ScsiDiskDevice->ScsiIo,
|
||||||
EFI_SCSI_STALL_SECONDS (2),
|
EFI_TIMER_PERIOD_SECONDS (2),
|
||||||
PtrSenseData,
|
PtrSenseData,
|
||||||
&SenseDataLength,
|
&SenseDataLength,
|
||||||
&HostAdapterStatus,
|
&HostAdapterStatus,
|
||||||
|
@ -1567,7 +1567,7 @@ ScsiDiskReadSectors (
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteCount = SectorCount * BlockSize;
|
ByteCount = SectorCount * BlockSize;
|
||||||
Timeout = EFI_SCSI_STALL_SECONDS (2);
|
Timeout = EFI_TIMER_PERIOD_SECONDS (2);
|
||||||
|
|
||||||
MaxRetry = 2;
|
MaxRetry = 2;
|
||||||
for (Index = 0; Index < MaxRetry; Index++) {
|
for (Index = 0; Index < MaxRetry; Index++) {
|
||||||
|
@ -1671,7 +1671,7 @@ ScsiDiskWriteSectors (
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteCount = SectorCount * BlockSize;
|
ByteCount = SectorCount * BlockSize;
|
||||||
Timeout = EFI_SCSI_STALL_SECONDS (2);
|
Timeout = EFI_TIMER_PERIOD_SECONDS (2);
|
||||||
MaxRetry = 2;
|
MaxRetry = 2;
|
||||||
for (Index = 0; Index < MaxRetry; Index++) {
|
for (Index = 0; Index < MaxRetry; Index++) {
|
||||||
Status = ScsiDiskWrite10 (
|
Status = ScsiDiskWrite10 (
|
||||||
|
|
Loading…
Reference in New Issue