public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Rhodes, Sean" <sean@starlabs.systems>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the port if status change returns an error
Date: Fri, 23 Dec 2022 08:56:02 +0000	[thread overview]
Message-ID: <DM6PR11MB40256365EF77AEA2C5B3E37ACAE99@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <68be875805735c1660336eadbde6253b6594f4f8.1671610501.git.sean@starlabs.systems>

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@edk2.groups.io
> Cc: Rhodes, Sean <sean@starlabs.systems>
> 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 <sean@starlabs.systems>
> ---
>  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]
> -=-=-=-=-=-=
> 


  reply	other threads:[~2022-12-23  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21  8:15 [PATCH] MdeModulePkg/Bus/Pci/XhciDxe: Reset the port if status change returns an error Sean Rhodes
2022-12-23  8:56 ` Wu, Hao A [this message]
2022-12-23 10:22   ` [edk2-devel] " Sean Rhodes
2023-01-03  1:24     ` Wu, Hao A
2023-01-04  4:01       ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB40256365EF77AEA2C5B3E37ACAE99@DM6PR11MB4025.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox