audk/MdeModulePkg/Bus/Usb
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
..
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/UsbMassStorageDxe: Check Get Max LUN status/value 2017-11-20 14:43:37 -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