]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UsbMass: Revert POWER_ON(29h) ASC handling logic
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 2 Mar 2018 09:29:56 +0000 (17:29 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Sat, 3 Mar 2018 07:48:59 +0000 (15:48 +0800)
This reverts commit 6461344c318cd43a5494c0302e142a0cbe386d52.
* MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized

UsbBootExecCmd() only calls UsbBootRequestSense() to get sense key
when CMD fails.
When POWER ON (29h) ASC returns from REQUEST SENSE, implementation
should retry the CMD, instead of treating this as a SUCCESS.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h

index 12e68d21497a4504ea37c5038600cc5df22cabb6..613008bde76837f174b37335c5a7e47d4bdae30f 100644 (file)
@@ -124,8 +124,6 @@ UsbBootRequestSense (
       Status = EFI_NOT_READY;\r
     } else if (SenseData.Asc == USB_BOOT_ASC_NO_MEDIA) {\r
       Status = EFI_NOT_READY;\r
-    } else if (SenseData.Asc == USB_BOOT_ASC_POWER_ON) {\r
-      Status = EFI_SUCCESS;\r
     }\r
     break;\r
 \r
index 5ee50ac52a21b4cb3a9505ab1d4778bbec6c6971..13a926035ceb4b6b5709ea3c86f6ea9b8134be5f 100644 (file)
@@ -2,7 +2,7 @@
   Definition of the command set of USB Mass Storage Specification\r
   for Bootability, Revision 1.0.\r
 \r
-Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2017, 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
@@ -55,7 +55,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define USB_BOOT_ASC_NOT_READY                        0x04\r
 #define USB_BOOT_ASC_NO_MEDIA                         0x3A\r
 #define USB_BOOT_ASC_MEDIA_CHANGE                     0x28\r
-#define USB_BOOT_ASC_POWER_ON                         0x29\r
 \r
 //\r
 // Supported PDT codes, or Peripheral Device Type\r