audk/MdeModulePkg
Michael D Kinney d8030c2ae0 MdeModulePkg/UsbMassStorageDxe: Enhance Request Sense Handling
https://bugzilla.tianocore.org/show_bug.cgi?id=782

Update the Request Sense check for the Request Sense Key of
USB_BOOT_SENSE_UNIT_ATTENTION.  For this Sense Key, the
Additional Sense Key to EFI_STATUS mappings are:

USB_BOOT_ASC_MEDIA_CHANGE -> EFI_MEDIA_CHANGE
USB_BOOT_ASC_NOT_READY    -> EFI_NOT_READY
USB_BOOT_ASC_NO_MEDIA     -> EFI_NOT_READY
All others                -> EFI_DEVICE_ERROR

A USB flash drive is returning Request Sense Key of
USB_BOOT_SENSE_UNIT_ATTENTION and an Additional Sense Key of
USB_BOOT_ASC_NO_MEDIA for a few seconds before returning an
Additional Sense Key of USB_BOOT_ASC_MEDIA_CHANGE.

The current logic treats this initial Request Sense info as an
error and reties the command 5 times before failing completely.

With this change the USB Flash Drive works correctly.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-11-17 10:37:56 -08:00
..
Application MdeModulePkg: Fix misuses of AllocateCopyPool 2017-11-08 17:13:03 +08:00
Bus MdeModulePkg/UsbMassStorageDxe: Enhance Request Sense Handling 2017-11-17 10:37:56 -08:00
Core MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode 2017-11-17 11:03:19 +08:00
Include MdeModulePkg/SmmMemoryAttribute.h: Add new protocol definitions 2017-11-17 11:01:01 +08:00
Library MdeModulePkg: Fix MSFT C4255 warning 2017-11-14 18:18:43 +08:00
Logo MdeModulePkg/LogoDxe: Return error if HII Package not present 2017-05-22 16:30:11 -07:00
Universal MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c 2017-11-16 14:09:21 +08:00
MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec,.uni: Add Protocol, PCDs and string tokens 2017-11-17 10:54:37 +08:00
MdeModulePkg.dsc MdeModulePkg: Add UdfDxe to the dsc file 2017-09-13 18:24:40 +08:00
MdeModulePkg.uni MdeModulePkg/MdeModulePkg.dec,.uni: Add Protocol, PCDs and string tokens 2017-11-17 10:54:37 +08:00
MdeModulePkgExtra.uni