]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UsbBotPei: Correct wrong media type detection logic in UsbBotPei
authorFeng Tian <feng.tian@intel.com>
Tue, 27 Jan 2015 03:07:01 +0000 (03:07 +0000)
committererictian <erictian@Edk2>
Tue, 27 Jan 2015 03:07:01 +0000 (03:07 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16661 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c

index b04bd42cfff155b6ecd74556963ec94804eae3f5..c436ed7a69efc2e8f48c6c6e20d98569bc336cce 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -656,10 +656,12 @@ PeiBotDetectMedia (
                   PeiServices,\r
                   PeiBotDev\r
                   );\r
-        //\r
-        // retry the ReadFormatCapacity command\r
-        //\r
-        PeiBotDev->DeviceType = USBFLOPPY2;\r
+        if (EFI_ERROR (Status)) {\r
+          //\r
+          // retry the ReadFormatCapacity command\r
+          //\r
+          PeiBotDev->DeviceType = USBFLOPPY2;\r
+        }\r
         break;\r
 \r
       default:\r