]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
MdeModulePkg/UsbMassStorageDxe: Fix USB Mass Storage detection
authorMichael D Kinney <michael.d.kinney@intel.com>
Mon, 30 Oct 2017 20:57:32 +0000 (13:57 -0700)
committerMichael D Kinney <michael.d.kinney@intel.com>
Wed, 15 Nov 2017 00:40:50 +0000 (16:40 -0800)
commit275b96da6081b05f515aea775bec8bef9bfeac88
treeaf3c0ecc136468c867af0879d087716a03e2c8dc
parente7275d3ffd410943479a9658707ab04d3e9f75ba
MdeModulePkg/UsbMassStorageDxe: Fix USB Mass Storage detection

https://bugzilla.tianocore.org/show_bug.cgi?id=766

Update logic to not return an error from UsbBootRequestSense()
if a Request Sense command responds with no sense information.
It is legal for a USB mass storage device to respond to a
Request Sense command with a SenseKey of
USB_BOOT_SENSE_NO_SENSE and an Additional Sense
Code of USB_BOOT_ASC_NO_ADDITIONAL_SENSE_INFORMATION.

This is described in Section 3.3 of the Universal Serial
Bus Mass Storage Specification For Bootability:

http://www.usb.org/developers/docs/devclass_docs/usb_msc_boot_1.0.pdf

The previous logic returned an error of EFI_NO_RESPONSE
and this caused USB mass storage devices such as a USB
floppy drive to not be detected.

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>
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h