audk/MdeModulePkg/Bus/Usb/UsbMassStorageDxe
Michael D Kinney 8d92f819f5 MdeModulePkg/UsbMassStorageDxe: Check Get Max LUN status/value
https://bugzilla.tianocore.org/show_bug.cgi?id=767

If a USB Mass Storage device does not support the Get
Max LUN command, then the USB I/O Protocol ControlTransfer()
service may return an error.  If an error is returned for
this command, then assume that the device does not support
multiple LUNs and return a maximum LUN value of 0.

The USB Mass Storage Class Specification states that a
maximum LUN value larger than 0x0F is invalid.  Add
a check to make sure this maximum LUN value is in this
valid range, and if it is not, then assume that the
device does not support multiple LUNs and return a
maximum LUN value of 0.

This change improves compatibility with USB FLASH drives
that do not support the Get Max LUN command or return
an invalid maximum LUN value.

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-20 14:43:37 -08:00
..
ComponentName.c Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid. 2011-07-06 03:55:36 +00:00
UsbMass.h MdeModulePkg: remove usb defined info 2014-11-24 14:52:50 +00:00
UsbMassBoot.c MdeModulePkg/UsbMassStorageDxe: Enhance Request Sense Handling 2017-11-17 10:37:56 -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 Produce DiskInfo for usb mass storage device 2011-06-13 05:27:23 +00:00
UsbMassCbi.h Produce DiskInfo for usb mass storage device 2011-06-13 05:27:23 +00:00
UsbMassDiskInfo.c fix file name lowercase/uppercase inconsistent issue. 2011-06-14 03:39:23 +00:00
UsbMassDiskInfo.h Coding style refinement. 2011-09-21 03:35:54 +00:00
UsbMassImpl.c MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum. 2015-08-06 07:13:16 +00:00
UsbMassImpl.h Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid. 2011-07-06 03:55:36 +00:00
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