From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smarthost01b.sbp.mail.zen.net.uk (smarthost01b.sbp.mail.zen.net.uk [212.23.1.3]) by mx.groups.io with SMTP id smtpd.web09.11694.1663679660373230382 for ; Tue, 20 Sep 2022 06:14:20 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=permerror, err=parse error for token &{10 18 sdn.klaviyomail.com}: permanent DNS error (domain: starlabs.systems, ip: 212.23.1.3, mailfrom: sean@starlabs.systems) Received: from [51.148.147.4] (helo=starbook.lan) by smarthost01b.sbp.mail.zen.net.uk with esmtp (Exim 4.90_1) (envelope-from ) id 1oad4q-0001Qn-1P; Tue, 20 Sep 2022 13:14:16 +0000 From: "Sean Rhodes" To: devel@edk2.groups.io Cc: Sean Rhodes , Hao A Wu , Ray Ni Subject: [PATCH 1/2] MdeModulePkg/UsbBusDxe: Avoid continuing on error path Date: Tue, 20 Sep 2022 14:14:12 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-smarthost01b-IP: [51.148.147.4] Feedback-ID: 51.148.147.4 Content-Transfer-Encoding: quoted-printable Zero out the PortState in case GetPortStatus didn't set it, to avoid continuing with EFI_DEVICE_ERROR. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Sean Rhodes --- 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 =3D NULL;=0D HubApi =3D HubIf->HubApi;=0D =0D + // Zero out PortState in case GetPortStatus does not set it and we=0D + // continue on the EFI_DEVICE_ERROR path=0D + PortState.PortStatus =3D 0;=0D + PortState.PortChangeStatus =3D 0;=0D +=0D //=0D // Host learns of the new device by polling the hub for port changes.=0D //=0D --=20 2.34.1