From c45bc17996455365e43d791870ba0d5af49aa0e3 Mon Sep 17 00:00:00 2001 From: Feng Tian Date: Tue, 27 Jan 2015 03:07:01 +0000 Subject: MdeModulePkg/UsbBotPei: Correct wrong media type detection logic in UsbBotPei Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian Reviewed-by: Star Zeng Reviewed-by: Chao Zhang 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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'MdeModulePkg/Bus') diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c index b04bd42cff..c436ed7a69 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -656,10 +656,12 @@ PeiBotDetectMedia ( PeiServices, PeiBotDev ); - // - // retry the ReadFormatCapacity command - // - PeiBotDev->DeviceType = USBFLOPPY2; + if (EFI_ERROR (Status)) { + // + // retry the ReadFormatCapacity command + // + PeiBotDev->DeviceType = USBFLOPPY2; + } break; default: -- cgit v1.2.3