Zero out the PortState in case GetPortStatus didn't set it, to avoid continuing with EFI_DEVICE_ERROR.
Cc: Hao A Wu <[email protected]> Cc: Ray Ni <[email protected]> Signed-off-by: Sean Rhodes <[email protected]> --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c index aed34596f4..7fc567898a 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -900,6 +900,11 @@ UsbEnumeratePort ( Child = NULL; HubApi = HubIf->HubApi; + // Zero out PortState in case GetPortStatus does not set it and we + // continue on the EFI_DEVICE_ERROR path + PortState.PortStatus = 0; + PortState.PortChangeStatus = 0; + // // Host learns of the new device by polling the hub for port changes. // -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93989): https://edk2.groups.io/g/devel/message/93989 Mute This Topic: https://groups.io/mt/93802896/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
