audk/MdeModulePkg/Bus/Usb
Ruiyu Ni a662afb5b0 MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change
When system boots to Shell without CDROM in the USB CDROM drive,
and then user inserts one CDROM with Eltorito file system,
"map -r" cannot show the the new Eltorito file system.

The root cause is when "map" command probes the media change
by calling dummy ReadBlockIo(), UsbMassStorage ReadBlockIo()
contains a bug that ignores the media change status:
UsbBootDetectMedia() ignores the EFI_MEDIA_CHANGED status
returned from UsbBootIsUnitReady(), in consequence, the
BlockIo protocol re-installation logic doesn't run.

By checking the code change history, below commit
SHA-1: 19bc852765
* remove unnecessary retry logic from usb mass storage driver.
adds the code to skip EFI_MEDIA_CHANGED status.

Talking with the original committer Tian Feng, he said the
change was just a code cleanup, not for a special bug fix.
So I revert part of the patch, only keep the change that
removes unnecessary retry logic. It can fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-01-22 10:18:04 +08:00
..
UsbBotPei MdeModulePkg/UsbBotPei: Fix undefined behavior in signed left shift 2017-04-13 08:59:07 +08:00
UsbBusDxe MdeModulePkg/UsbBusDxe: Add UsbControlTransfer() error check 2017-11-20 14:43:28 -08:00
UsbBusPei MdeModulePkg/Usb: Fix wrong condition judgment to support usb3.1 dev 2016-04-21 15:53:14 +08:00
UsbKbDxe MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7 2017-06-20 09:29:42 +08:00
UsbMassStorageDxe MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change 2018-01-22 10:18:04 +08:00
UsbMouseAbsolutePointerDxe MdeModulePkg/UsbMouseAbsolutePointerDxe: fix VS2015 NOOPT build error 2016-05-12 10:01:22 +08:00
UsbMouseDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00