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>
This commit is contained in:
committed by
Matt DeVillier
parent
4ba839c5c8
commit
a03327088a
@ -725,6 +725,7 @@ UsbEnumerateNewDev (
|
|||||||
|
|
||||||
if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) {
|
if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) {
|
||||||
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: No device present at port %d\n", Port));
|
DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: No device present at port %d\n", Port));
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
} else if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
|
} else if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_SUPER_SPEED)){
|
||||||
Child->Speed = EFI_USB_SPEED_SUPER;
|
Child->Speed = EFI_USB_SPEED_SUPER;
|
||||||
|
Reference in New Issue
Block a user