]> git.proxmox.com Git - mirror_edk2.git/commitdiff
return EFI_DEVICE_ERROR if the Status value is not EFI_SUCCESS.
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Oct 2010 02:55:16 +0000 (02:55 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Oct 2010 02:55:16 +0000 (02:55 +0000)
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/Ata/AtaBusDxe/AtaBus.c
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c

index dc5c980ee9002a2097dfd9ed4ae21515f2bee87a..9bf0a61a5aa2cc26da0989c5061e55ad4a82c024 100644 (file)
@@ -4,7 +4,7 @@
   This file implements protocol interfaces: Driver Binding protocol,\r
   Block IO protocol and DiskInfo protocol.\r
     \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -773,6 +773,10 @@ AtaBlockIoReset (
 \r
   Status = ResetAtaDevice (AtaDevice);  \r
 \r
+  if (EFI_ERROR (Status)) {\r
+    Status = EFI_DEVICE_ERROR;\r
+  }\r
+\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
 }\r
index c1d96b936ebe147918ef4a4667d1f3dd3d7c1b8c..3f6963ef198e41543158df291175c8677e0acfc2 100644 (file)
@@ -398,12 +398,22 @@ ScsiDiskReset (
 \r
   Status          = ScsiDiskDevice->ScsiIo->ResetDevice (ScsiDiskDevice->ScsiIo);\r
 \r
+  if (EFI_ERROR (Status)) {\r
+    Status = EFI_DEVICE_ERROR;\r
+    goto Done;\r
+  }\r
+\r
   if (!ExtendedVerification) {\r
     goto Done;\r
   }\r
 \r
   Status = ScsiDiskDevice->ScsiIo->ResetBus (ScsiDiskDevice->ScsiIo);\r
 \r
+  if (EFI_ERROR (Status)) {\r
+    Status = EFI_DEVICE_ERROR;\r
+    goto Done;\r
+  }\r
+\r
 Done:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
index 9871d9359d1c8fdfbeb196da93dd3de3f9b3c7b4..efb06a073c32df6d520e2f187dd203ff2f6eb8ca 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of the USB mass storage Bulk-Only Transport protocol,\r
   according to USB Mass Storage Class Bulk-Only Transport, Revision 1.0.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -484,7 +484,7 @@ UsbBotResetDevice (
     //\r
     Status = UsbBot->UsbIo->UsbPortReset (UsbBot->UsbIo);\r
     if (EFI_ERROR (Status)) {\r
-      return Status;\r
+      return EFI_DEVICE_ERROR;\r
     }\r
   }\r
 \r
@@ -510,7 +510,7 @@ UsbBotResetDevice (
                             );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    return EFI_DEVICE_ERROR;\r
   }\r
 \r
   //\r
index f9c56e24e8dc0664fa6202b6dbccc064eb0fff8f..b0ee6d56bf9cd57f014cdc8ee9010a638e4ce375 100644 (file)
@@ -4,7 +4,7 @@
   Notice: it is being obsoleted by the standard body in favor of the BOT\r
   (Bulk-Only Transport).\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -575,7 +575,7 @@ UsbCbiResetDevice (
   //\r
   Status = UsbCbiSendCommand (UsbCbi, ResetCmd, USB_CBI_RESET_CMD_LEN, Timeout);\r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    return EFI_DEVICE_ERROR;\r
   }\r
 \r
   //\r