audk/MdeModulePkg/Bus/Usb/UsbMassStorageDxe
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
..
ComponentName.c
UsbMass.h MdeModulePkg: remove usb defined info 2014-11-24 14:52:50 +00:00
UsbMassBoot.c MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change 2018-01-22 10:18:04 +08:00
UsbMassBoot.h MdeModulePkg/UsbMassStorageDxe: Fix USB Mass Storage detection 2017-11-14 16:40:50 -08:00
UsbMassBot.c MdeModulePkg/UsbMassStorageDxe: Check Get Max LUN status/value 2017-11-20 14:43:37 -08:00
UsbMassBot.h MdeModulePkg/Bus: Fix typos in comments 2016-10-27 09:11:16 +08:00
UsbMassCbi.c
UsbMassCbi.h
UsbMassDiskInfo.c
UsbMassDiskInfo.h
UsbMassImpl.c MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum. 2015-08-06 07:13:16 +00:00
UsbMassImpl.h
UsbMassStorageDxe.inf MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:34:06 +00:00
UsbMassStorageDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
UsbMassStorageDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00