audk/MdeModulePkg/Bus
Ruiyu Ni 6461344c31 MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized
In below calling stack:
UsbBootIsUnitReady()
 UsbBootExecCmdWithRetry()
  UsbBootExecCmd()
    UsbBootRequestSense()
When USB CDROM is hot-plugged, UsbBootRequestSense() retrieves sense
key (6 = UnitAttention), additional sense code (29h = Power ON).
But it wrongly maps such sense data to Device Error status.
It causes UsbBootExecCmd() executed again.
In the second time call to UsbBootExecCmd(), UsbBootRequestSense()
retrieves sense key (6 = UnitAttention), additional sense code
(28h = media changed).

The above analysis explains why hot-plug USB CDROM cannot be
recognized after below commit:
SHA1 a662afb5b0
* MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change,
which removes the media changed status check in UsbBootDetectMedia().

The proper fix to this problem is to map the ASC (additional sense
code 29h) properly to success status so that no second call to
UsbBootExecCmd() is made.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
2018-02-15 14:17:22 +08:00
..
Ata MdeModulePkg/AtaAtapiPassThru: Revert patch to disable PCI attributes 2017-11-29 09:02:46 +08:00
I2c/I2cDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Isa MdeModulePkg/Ps2Kb: ReadKeyStrokeEx always return key state 2018-02-01 14:04:02 +08:00
Pci MdeModulePkg/PciBusDxe: Fix VS2012 build failure 2018-02-08 12:46:46 +08:00
Scsi MdeModulePkg/ScsiDisk: Return EFI_NO_MEDIA when no media presents 2017-12-09 12:32:42 +08:00
Sd MdeModulePkg/SdBlockIoPei: Support IoMmu 2017-11-17 11:38:46 +08:00
Ufs MdeModulePkg/UfsBlockIoPei: Support IoMmu 2017-11-17 11:35:02 +08:00
Usb MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized 2018-02-15 14:17:22 +08:00