From c6e797aedafc09b241339587116f3fe51c41131a Mon Sep 17 00:00:00 2001 From: erictian Date: Tue, 19 Oct 2010 02:55:16 +0000 Subject: return EFI_DEVICE_ERROR if the Status value is not EFI_SUCCESS. it's because BlockIo.Reset() only has two possible values: EFI_SUCCESS and EFI_DEVICE_ERROR according to UEFI2.3 spec git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10956 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'MdeModulePkg/Bus/Scsi') diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index c1d96b936e..3f6963ef19 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -398,12 +398,22 @@ ScsiDiskReset ( Status = ScsiDiskDevice->ScsiIo->ResetDevice (ScsiDiskDevice->ScsiIo); + if (EFI_ERROR (Status)) { + Status = EFI_DEVICE_ERROR; + goto Done; + } + if (!ExtendedVerification) { goto Done; } Status = ScsiDiskDevice->ScsiIo->ResetBus (ScsiDiskDevice->ScsiIo); + if (EFI_ERROR (Status)) { + Status = EFI_DEVICE_ERROR; + goto Done; + } + Done: gBS->RestoreTPL (OldTpl); return Status; -- cgit v1.2.3