diff options
author | Marcin Wojtas <mw@semihalf.com> | 2019-07-31 14:25:19 +0800 |
---|---|---|
committer | Hao A Wu <hao.a.wu@intel.com> | 2019-08-05 09:35:33 +0800 |
commit | 1702e2ce5a5bc2eb4514f6b1c0d68927b920528a (patch) | |
tree | 1dab8fe24eedb8bdb47aa4417e602f90d35561d7 /MdeModulePkg | |
parent | e18d1c37e812284c5db1f2775db15ca349730138 (diff) | |
download | edk2-1702e2ce5a5bc2eb4514f6b1c0d68927b920528a.tar.gz edk2-1702e2ce5a5bc2eb4514f6b1c0d68927b920528a.tar.bz2 edk2-1702e2ce5a5bc2eb4514f6b1c0d68927b920528a.zip |
MdeModulePkg/UsbBusDxe: Return error when the device is not present
Until now, during the USB device enumeration when its PortState
USB_PORT_STAT_CONNECTION bit was not set, the stack was not informed
that the device is not present. Fix that by returning appropriate
error code.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c index 0cded1eea7..eaa0d70024 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -719,6 +719,7 @@ UsbEnumerateNewDev ( if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) {
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: No device present at port %d\n", Port));
+ Status = EFI_NOT_FOUND;
goto ON_ERROR;
} else if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
Child->Speed = EFI_USB_SPEED_SUPER;
|