From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by mx.groups.io with SMTP id smtpd.web11.69388.1671790959915906272 for ; Fri, 23 Dec 2022 02:22:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@starlabs-systems.20210112.gappssmtp.com header.s=20210112 header.b=HnQd0rGW; spf=pass (domain: starlabs.systems, ip: 209.85.219.179, mailfrom: sean@starlabs.systems) Received: by mail-yb1-f179.google.com with SMTP id t15so4840351ybq.4 for ; Fri, 23 Dec 2022 02:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=4t8BVc4qaSh+AuH74S8+4+k10X2AIfMB28nJhbrEyGY=; b=HnQd0rGWbe8cNTv3tS2ue6Dp63Ql5JKW610prMQW1TMb76/iWPdhmkFMFurbY8OzgN QdUfBjO8rba23V/DekWrBmaflhEpcioCVm66zc5o66AqHsRZLgg1T/+HQhShPo2R3ajl yAfLf0tkxhJWBmNreSpEzsXlcmMh3pocofSBtunKNP8/S/igBzd9Ztk3dAldysK7JReO 0dZ076LTyCq2IaChgjiZBzxqwNHkq8KxNRVnRJgFploOArQ1zQ9Siiy3sjv6xNPvz+Fd RV7EbRQmc2tcQG9YKYaHWpj0q+t5Ohdlm+rW4cJdnAXiuEIL/1ELlqqRQO3DCWFsqPOq A61A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4t8BVc4qaSh+AuH74S8+4+k10X2AIfMB28nJhbrEyGY=; b=t6Y+nWtpw6sYBxxWvQe547RrvIh9QIgyIiaoBYK/GBinER8A8vI4JVRLn09icF4Kgk tWe7hUYS8IO8G8xodiDRe2B/lk91dTSHvMp/LP6hGC5Kp8oFeUMEFJ3lm8KUpBSKCP8/ /nmf1uiKYK68n2A4tjIUbjc/Mc1moocQ9p/yn7CUaZqp7havYoirhUsk34kQ3f5JUzek DkRX5MnQB/ncVD18zO3p1ijeFTUCEbx6wyE9Gh/u/XJEfaBYsv2xhyRw6cpLn1LX5r3f NeIlXrgDFMaZSRGQjPo1ZlpWUNqwqd8X88z1S06QnFBjGNVYnAVeT2lKl9n+cTWzcXt1 x6oQ== X-Gm-Message-State: AFqh2kojISWXqHomkfQYgheNN2gfqNQTLVPGxvrj36KHwRa+mmK6UcsP 2mvDjTup6WW5tH9e0sGr/MpdYQ7Ut7B9+qBsXdico+mkw2qFblE= X-Google-Smtp-Source: AMrXdXtLbU6El0gunGpKWhC7rXoHC5WdMMN8GodrxiNYgJALJrai5KEf6AO9BXiySV6cusZ7+kfjbTUm7xSrsFPN5Mg= X-Received: by 2002:a25:8b03:0:b0:755:9702:22bb with SMTP id i3-20020a258b03000000b00755970222bbmr1038181ybl.345.1671790958346; Fri, 23 Dec 2022 02:22:38 -0800 (PST) MIME-Version: 1.0 References: <68be875805735c1660336eadbde6253b6594f4f8.1671610501.git.sean@starlabs.systems> In-Reply-To: From: "Sean Rhodes" Date: Fri, 23 Dec 2022 10:22:27 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the port if status change returns an error To: devel@edk2.groups.io, hao.a.wu@intel.com Content-Type: multipart/alternative; boundary="00000000000036254205f07c2ad0" --00000000000036254205f07c2ad0 Content-Type: text/plain; charset="UTF-8" Hi Hao This PR has passed CI - https://github.com/tianocore/edk2/pull/3353 Thanks Sean On Fri, 23 Dec 2022 at 08:56, Wu, Hao A wrote: > Sorry, > > The CI tests failed for the proposed patch: > https://github.com/tianocore/edk2/pull/3824 > > Could you help to check and resolve? Thanks. > > Best Regards, > Hao Wu > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Sean > > Rhodes > > Sent: Wednesday, December 21, 2022 4:15 PM > > To: devel@edk2.groups.io > > Cc: Rhodes, Sean > > Subject: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the > > port if status change returns an error > > > > Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit in > > PortChangeStatus > > when XhcPollPortStatusChange fails > > > > Signed-off-by: Sean Rhodes > > --- > > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > > b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > > index 461b2cd9b5..d8fa41f68f 100644 > > --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > > @@ -471,7 +471,16 @@ XhcGetRootHubPortStatus ( > > // For those devices behind hub, we get its attach/detach event by > hooking > > Get_Port_Status request at control transfer for those hub. > > > > // > > > > ParentRouteChart.Dword = 0; > > > > - XhcPollPortStatusChange (Xhc, ParentRouteChart, PortNumber, > PortStatus); > > > > + Status = XhcPollPortStatusChange (Xhc, > ParentRouteChart, > > PortNumber, PortStatus); > > > > + > > > > + // > > > > + // Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit > in > > PortChangeStatus > > > > + // when XhcPollPortStatusChange fails > > > > + // > > > > + if (EFI_ERROR (Status)) { > > > > + PortStatus->PortChangeStatus &= ~(USB_PORT_STAT_C_RESET); > > > > + Status = EFI_SUCCESS; > > > > + } > > > > > > > > ON_EXIT: > > > > gBS->RestoreTPL (OldTpl); > > > > -- > > 2.37.2 > > > > > > > > -=-=-=-=-=-= > > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#97683): https://edk2.groups.io/g/devel/message/97683 > > Mute This Topic: https://groups.io/mt/95802798/1768737 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > > -=-=-=-=-=-= > > > > > > > > > --00000000000036254205f07c2ad0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hao


Thanks

Sean
=

= On Fri, 23 Dec 2022 at 08:56, Wu, Hao A <hao.a.wu@intel.com> wrote:
Sorry,

The CI tests failed for the proposed patch:
https://github.com/tianocore/edk2/pull/3824

Could you help to check and resolve? Thanks.

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@= edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean
> Rhodes
> Sent: Wednesday, December 21, 2022 4:15 PM
> To: devel@ed= k2.groups.io
> Cc: Rhodes, Sean <sean@starlabs.systems>
> Subject: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the<= br> > port if status change returns an error
>
> Force resetting the port by clearing the USB_PORT_STAT_C_RESET bit in<= br> > PortChangeStatus
> when XhcPollPortStatusChange fails
>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> ---
>=C2=A0 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 11 ++++++++++-
>=C2=A0 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> index 461b2cd9b5..d8fa41f68f 100644
> --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
> @@ -471,7 +471,16 @@ XhcGetRootHubPortStatus (
>=C2=A0 =C2=A0 // For those devices behind hub, we get its attach/detach= event by hooking
> Get_Port_Status request at control transfer for those hub.
>
>=C2=A0 =C2=A0 //
>
>=C2=A0 =C2=A0 ParentRouteChart.Dword =3D 0;
>
> -=C2=A0 XhcPollPortStatusChange (Xhc, ParentRouteChart, PortNumber, Po= rtStatus);
>
> +=C2=A0 Status=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0=3D XhcPollPortStatusChange (Xhc, ParentRouteChart,
> PortNumber, PortStatus);
>
> +
>
> +=C2=A0 //
>
> +=C2=A0 // Force resetting the port by clearing the USB_PORT_STAT_C_RE= SET bit in
> PortChangeStatus
>
> +=C2=A0 // when XhcPollPortStatusChange fails
>
> +=C2=A0 //
>
> +=C2=A0 if (EFI_ERROR (Status)) {
>
> +=C2=A0 =C2=A0 PortStatus->PortChangeStatus &=3D ~(USB_PORT_STA= T_C_RESET);
>
> +=C2=A0 =C2=A0 Status=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D EFI_SUCCESS;
>
> +=C2=A0 }
>
>
>
>=C2=A0 ON_EXIT:
>
>=C2=A0 =C2=A0 gBS->RestoreTPL (OldTpl);
>
> --
> 2.37.2
>
>
>
> -=3D-=3D-=3D-=3D-=3D-=3D
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#97683): https://edk2.groups.io/= g/devel/message/97683
> Mute This Topic: https://groups.io/mt/95802798/1768737=
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]=
> -=3D-=3D-=3D-=3D-=3D-=3D
>






--00000000000036254205f07c2ad0--