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
UsbMass.h
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
UsbMassCbi.h
UsbMassDiskInfo.c
UsbMassDiskInfo.h
UsbMassImpl.c
UsbMassImpl.h
UsbMassStorageDxe.inf
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