]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c
MdeModulePkg/UsbBotPei: Correct wrong media type detection logic in UsbBotPei
[mirror_edk2.git] / 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