Re: [edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-21 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Hi Hao,
I just sent out three patches and below is PR which passed the CI.
https://github.com/tianocore/edk2/pull/3794

Thanks
Abner

> -Original Message-
> From: Wu, Hao A 
> Sent: Tuesday, December 20, 2022 11:03 AM
> To: Chang, Abner ; devel@edk2.groups.io
> Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> ; Kirkendall, Garrett 
> Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> value
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> Thanks,
> 
> For this patch "MdeModulePkg/XhciPei: Unlinked XhciPei memory block", my
> take is that there will also be an updated version, right?
> If this is the case, could you help to send out a single 3-patch series for 
> them
> instead of sending 3 separated patches? Thanks in advance.
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: Chang, Abner 
> > Sent: Tuesday, December 20, 2022 10:45 AM
> > To: Wu, Hao A ; devel@edk2.groups.io
> > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> > ; Kirkendall, Garrett 
> > Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > Context value
> >
> > [AMD Official Use Only - General]
> >
> > Hi Hao,
> > That is the uncrustify check error. I already fixed it at "[PATCH V3]
> > MdeModulePkg/Usb: Read a large number of blocks."
> >
> > Also, these three patches are passed the CI test.
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2Ftianocore%2Fedk2%2Fpull%2F3794&data=05%7C01%7CAbner.Chan
> g%40a
> >
> md.com%7C187600a1cd0942afb7b708dae236cbf5%7C3dd8961fe4884e608e11
> a82d99
> >
> 4e183d%7C0%7C0%7C638071022231599779%7CUnknown%7CTWFpbGZsb3d8e
> yJWIjoiMC
> >
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C
> %7C%
> >
> 7C&sdata=AqFmywwFq9wJmix13UNfBDdT84wtFK%2BH8THRa7iYcm4%3D&rese
> rved=0
> >
> > Thanks
> > Abner
> >
> > > -Original Message-
> > > From: Wu, Hao A 
> > > Sent: Monday, December 12, 2022 11:27 AM
> > > To: Chang, Abner ; devel@edk2.groups.io
> > > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> > > ; Kirkendall, Garrett 
> > > Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > > Context value
> > >
> > > Caution: This message originated from an External Source. Use proper
> > > caution when opening attachments, clicking links, or responding.
> > >
> > >
> > > For the 3 patches:
> > > [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block
> > [PATCH
> > > V2] MdeModulePkg/Usb: Read a large number of blocks [PATCH V3]
> > > MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value
> > >
> > > I found that they will cause CI failures:
> > >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> > >
> > ub.com%2Ftianocore%2Fedk2%2Fpull%2F3749&data=05%7C01%7Cabn
> > >
> > er.chang%40amd.com%7Cfe921dc0e08b4cdf30a208dadbf0cb8c%7C3dd8961
> > f
> > >
> > e4884e608e11a82d994e183d%7C0%7C0%7C638064124508360013%7CUnkno
> > w
> > >
> > n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> > > WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0iQKJ3X3IJv1CSqe
> > > mjTWyT1hlYvqGZsYPAdwXEi%2B%2FZ4%3D&reserved=0
> > > Could you help to update them and help to ensure they can pass the CI 
> > > test?
> > > Thanks in advance.
> > >
> > > Best Regards,
> > > Hao Wu
> > >
> > > > -Original Message-
> > > > From: abner.ch...@amd.com 
> > > > Sent: Saturday, December 10, 2022 11:08 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: kuei-hung@amd.com; Wu, Hao A ; Ni, Ray
> > > > ; Garrett Kirkendall
> > > > ; Abner Chang 
> > > > Subject: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > > > Context value
> > > >
> > > > From: Abner Chang 
> > > >
> > > > In V3: Add AMD copyright.
> > > > In V2: Remove the signed-off-by: Abner Chang.
> > > >
> > > > Initialize XHCI DCI slot's context entries value.
> > > >
> > > > Signed-off-by: Kuei-Hung Lin 
> > > > Cc: Hao A Wu 
> > > > Cc: Ray Ni 
> > > > Cc: Garrett Kirkendall 
> > > > Cc: Abner Chang 
> > > > ---
> > > >  MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
> > > > MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
> > > >  2 files changed, 14 insertions(+)
> > > >
> > > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > index 13b0400e83d..f08722905f3 100644
> > > > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > @@ -4,6 +4,7 @@
> > > >
> > > >  Copyright (c) 2011 - 2020, Intel Corporation. All rights
> > > > reserved.  Copyright (c) Microsoft Corporation.
> > > > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > > > +reserved.
> > > >  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > >
> > > >  **/
> > > > @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
> > > >MaxDci = 0;
> > > >
> > > >NumEp = IfDesc->NumEndpoi

Re: [edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-19 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Ah ok, that would be good.

Thanks
Abner

> -Original Message-
> From: Wu, Hao A 
> Sent: Tuesday, December 20, 2022 11:03 AM
> To: Chang, Abner ; devel@edk2.groups.io
> Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> ; Kirkendall, Garrett 
> Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> value
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Thanks,
> 
> For this patch "MdeModulePkg/XhciPei: Unlinked XhciPei memory block",
> my take is that there will also be an updated version, right?
> If this is the case, could you help to send out a single 3-patch series for 
> them
> instead of sending 3 separated patches? Thanks in advance.
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: Chang, Abner 
> > Sent: Tuesday, December 20, 2022 10:45 AM
> > To: Wu, Hao A ; devel@edk2.groups.io
> > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> > ; Kirkendall, Garrett 
> > Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > Context value
> >
> > [AMD Official Use Only - General]
> >
> > Hi Hao,
> > That is the uncrustify check error. I already fixed it at "[PATCH V3]
> > MdeModulePkg/Usb: Read a large number of blocks."
> >
> > Also, these three patches are passed the CI test.
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2Ftianocore%2Fedk2%2Fpull%2F3794&data=05%7C01%7CAbner.Ch
> ang%40a
> >
> md.com%7C187600a1cd0942afb7b708dae236cbf5%7C3dd8961fe4884e608e11
> a82d99
> >
> 4e183d%7C0%7C0%7C638071022231599779%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC
> >
> 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%
> 7C%7C%
> >
> 7C&sdata=AqFmywwFq9wJmix13UNfBDdT84wtFK%2BH8THRa7iYcm4%3D&r
> eserved=0
> >
> > Thanks
> > Abner
> >
> > > -Original Message-
> > > From: Wu, Hao A 
> > > Sent: Monday, December 12, 2022 11:27 AM
> > > To: Chang, Abner ; devel@edk2.groups.io
> > > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> > > ; Kirkendall, Garrett 
> > > Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > > Context value
> > >
> > > Caution: This message originated from an External Source. Use proper
> > > caution when opening attachments, clicking links, or responding.
> > >
> > >
> > > For the 3 patches:
> > > [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block
> > [PATCH
> > > V2] MdeModulePkg/Usb: Read a large number of blocks [PATCH V3]
> > > MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value
> > >
> > > I found that they will cause CI failures:
> > >
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> > >
> >
> ub.com%2Ftianocore%2Fedk2%2Fpull%2F3749&data=05%7C01%7Cabn
> > >
> >
> er.chang%40amd.com%7Cfe921dc0e08b4cdf30a208dadbf0cb8c%7C3dd8961
> > f
> > >
> > e4884e608e11a82d994e183d%7C0%7C0%7C638064124508360013%7CUnkno
> > w
> > >
> >
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> > >
> WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0iQKJ3X3IJv1CSqe
> > > mjTWyT1hlYvqGZsYPAdwXEi%2B%2FZ4%3D&reserved=0
> > > Could you help to update them and help to ensure they can pass the CI
> test?
> > > Thanks in advance.
> > >
> > > Best Regards,
> > > Hao Wu
> > >
> > > > -Original Message-
> > > > From: abner.ch...@amd.com 
> > > > Sent: Saturday, December 10, 2022 11:08 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: kuei-hung@amd.com; Wu, Hao A ; Ni,
> Ray
> > > > ; Garrett Kirkendall
> > > > ; Abner Chang
> 
> > > > Subject: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > > > Context value
> > > >
> > > > From: Abner Chang 
> > > >
> > > > In V3: Add AMD copyright.
> > > > In V2: Remove the signed-off-by: Abner Chang.
> > > >
> > > > Initialize XHCI DCI slot's context entries value.
> > > >
> > > > Signed-off-by: Kuei-Hung Lin 
> > > > Cc: Hao A Wu 
> > > > Cc: Ray Ni 
> > > > Cc: Garrett Kirkendall 
> > > > Cc: Abner Chang 
> > > > ---
> > > >  MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
> > > > MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
> > > >  2 files changed, 14 insertions(+)
> > > >
> > > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > index 13b0400e83d..f08722905f3 100644
> > > > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > > @@ -4,6 +4,7 @@
> > > >
> > > >  Copyright (c) 2011 - 2020, Intel Corporation. All rights
> > > > reserved.  Copyright (c) Microsoft Corporation.
> > > > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > > > +reserved.
> > > >  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > >
> > > >  **/
> > > > @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
> > > >MaxDci = 0;
> > > >
> > > >NumEp = IfDesc->NumEndpoints;
> > > > +  if (NumEp == 0) {
> > > > +MaxDci = 1;
> > > > +  }
> > > >
>

Re: [edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-19 Thread Wu, Hao A
Thanks,

For this patch "MdeModulePkg/XhciPei: Unlinked XhciPei memory block", my take 
is that there will also be an updated version, right?
If this is the case, could you help to send out a single 3-patch series for 
them instead of sending 3 separated patches? Thanks in advance.

Best Regards,
Hao Wu

> -Original Message-
> From: Chang, Abner 
> Sent: Tuesday, December 20, 2022 10:45 AM
> To: Wu, Hao A ; devel@edk2.groups.io
> Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> ; Kirkendall, Garrett 
> Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> value
> 
> [AMD Official Use Only - General]
> 
> Hi Hao,
> That is the uncrustify check error. I already fixed it at "[PATCH V3]
> MdeModulePkg/Usb: Read a large number of blocks."
> 
> Also, these three patches are passed the CI test.
> https://github.com/tianocore/edk2/pull/3794
> 
> Thanks
> Abner
> 
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Monday, December 12, 2022 11:27 AM
> > To: Chang, Abner ; devel@edk2.groups.io
> > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> > ; Kirkendall, Garrett 
> > Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > Context value
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > For the 3 patches:
> > [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block
> [PATCH
> > V2] MdeModulePkg/Usb: Read a large number of blocks [PATCH V3]
> > MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value
> >
> > I found that they will cause CI failures:
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> >
> ub.com%2Ftianocore%2Fedk2%2Fpull%2F3749&data=05%7C01%7Cabn
> >
> er.chang%40amd.com%7Cfe921dc0e08b4cdf30a208dadbf0cb8c%7C3dd8961
> f
> >
> e4884e608e11a82d994e183d%7C0%7C0%7C638064124508360013%7CUnkno
> w
> >
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> > WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0iQKJ3X3IJv1CSqe
> > mjTWyT1hlYvqGZsYPAdwXEi%2B%2FZ4%3D&reserved=0
> > Could you help to update them and help to ensure they can pass the CI test?
> > Thanks in advance.
> >
> > Best Regards,
> > Hao Wu
> >
> > > -Original Message-
> > > From: abner.ch...@amd.com 
> > > Sent: Saturday, December 10, 2022 11:08 PM
> > > To: devel@edk2.groups.io
> > > Cc: kuei-hung@amd.com; Wu, Hao A ; Ni, Ray
> > > ; Garrett Kirkendall ;
> > > Abner Chang 
> > > Subject: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's
> > > Context value
> > >
> > > From: Abner Chang 
> > >
> > > In V3: Add AMD copyright.
> > > In V2: Remove the signed-off-by: Abner Chang.
> > >
> > > Initialize XHCI DCI slot's context entries value.
> > >
> > > Signed-off-by: Kuei-Hung Lin 
> > > Cc: Hao A Wu 
> > > Cc: Ray Ni 
> > > Cc: Garrett Kirkendall 
> > > Cc: Abner Chang 
> > > ---
> > >  MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
> > > MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
> > >  2 files changed, 14 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > index 13b0400e83d..f08722905f3 100644
> > > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > > @@ -4,6 +4,7 @@
> > >
> > >  Copyright (c) 2011 - 2020, Intel Corporation. All rights
> > > reserved.  Copyright (c) Microsoft Corporation.
> > > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > > +reserved.
> > >  SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > >  **/
> > > @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
> > >MaxDci = 0;
> > >
> > >NumEp = IfDesc->NumEndpoints;
> > > +  if (NumEp == 0) {
> > > +MaxDci = 1;
> > > +  }
> > >
> > >EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> > >for (EpIndex = 0; EpIndex < NumEp; EpIndex++) { @@ -3006,6
> > > +3010,9 @@ XhcInitializeEndpointContext64 (
> > >MaxDci = 0;
> > >
> > >NumEp = IfDesc->NumEndpoints;
> > > +  if (NumEp == 0) {
> > > +MaxDci = 1;
> > > +  }
> > >
> > >EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> > >for (EpIndex = 0; EpIndex < NumEp; EpIndex++) { diff --git
> > > a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > > b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > > index cc597a43717..8400c90f7ad 100644
> > > --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > > +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > > @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid
> based
> > on
> > > gPeiUsbControllerPpiGuid  which is used to enable recovery function
> > > from USB Drivers.
> > >
> > >  Copyright (c) 2014 - 2017, Intel Corporation. All rights
> > > reserved.
> > > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > > +reserved.
> > >
> > >  SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > > @@ -1752,6 +1753,9 @@ XhcPeiSetConfigCmd (
> > >  }
> > >
> > >  NumEp = IfD

Re: [edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-19 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Hi Hao,
That is the uncrustify check error. I already fixed it at "[PATCH V3] 
MdeModulePkg/Usb: Read a large number of blocks."

Also, these three patches are passed the CI test.
https://github.com/tianocore/edk2/pull/3794

Thanks
Abner

> -Original Message-
> From: Wu, Hao A 
> Sent: Monday, December 12, 2022 11:27 AM
> To: Chang, Abner ; devel@edk2.groups.io
> Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray
> ; Kirkendall, Garrett 
> Subject: RE: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> value
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> For the 3 patches:
> [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block [PATCH
> V2] MdeModulePkg/Usb: Read a large number of blocks [PATCH V3]
> MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value
> 
> I found that they will cause CI failures:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftianocore%2Fedk2%2Fpull%2F3749&data=05%7C01%7Cabn
> er.chang%40amd.com%7Cfe921dc0e08b4cdf30a208dadbf0cb8c%7C3dd8961f
> e4884e608e11a82d994e183d%7C0%7C0%7C638064124508360013%7CUnknow
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0iQKJ3X3IJv1CSqe
> mjTWyT1hlYvqGZsYPAdwXEi%2B%2FZ4%3D&reserved=0
> Could you help to update them and help to ensure they can pass the CI test?
> Thanks in advance.
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: abner.ch...@amd.com 
> > Sent: Saturday, December 10, 2022 11:08 PM
> > To: devel@edk2.groups.io
> > Cc: kuei-hung@amd.com; Wu, Hao A ; Ni, Ray
> > ; Garrett Kirkendall ;
> > Abner Chang 
> > Subject: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> > value
> >
> > From: Abner Chang 
> >
> > In V3: Add AMD copyright.
> > In V2: Remove the signed-off-by: Abner Chang.
> >
> > Initialize XHCI DCI slot's context entries value.
> >
> > Signed-off-by: Kuei-Hung Lin 
> > Cc: Hao A Wu 
> > Cc: Ray Ni 
> > Cc: Garrett Kirkendall 
> > Cc: Abner Chang 
> > ---
> >  MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
> > MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
> >  2 files changed, 14 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > index 13b0400e83d..f08722905f3 100644
> > --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> > @@ -4,6 +4,7 @@
> >
> >  Copyright (c) 2011 - 2020, Intel Corporation. All rights
> > reserved.  Copyright (c) Microsoft Corporation.
> > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > +reserved.
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
> >MaxDci = 0;
> >
> >NumEp = IfDesc->NumEndpoints;
> > +  if (NumEp == 0) {
> > +MaxDci = 1;
> > +  }
> >
> >EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> >for (EpIndex = 0; EpIndex < NumEp; EpIndex++) { @@ -3006,6 +3010,9
> > @@ XhcInitializeEndpointContext64 (
> >MaxDci = 0;
> >
> >NumEp = IfDesc->NumEndpoints;
> > +  if (NumEp == 0) {
> > +MaxDci = 1;
> > +  }
> >
> >EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> >for (EpIndex = 0; EpIndex < NumEp; EpIndex++) { diff --git
> > a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > index cc597a43717..8400c90f7ad 100644
> > --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> > @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based
> on
> > gPeiUsbControllerPpiGuid  which is used to enable recovery function
> > from USB Drivers.
> >
> >  Copyright (c) 2014 - 2017, Intel Corporation. All rights
> > reserved.
> > +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> > +reserved.
> >
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -1752,6 +1753,9 @@ XhcPeiSetConfigCmd (
> >  }
> >
> >  NumEp = IfDesc->NumEndpoints;
> > +if ((NumEp == 0) && (MaxDci == 0)) {
> > +  MaxDci = 1;
> > +}
> >
> >  EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> >  for (EpIndex = 0; EpIndex < NumEp; EpIndex++) { @@ -1974,6
> > +1978,9 @@ XhcPeiSetConfigCmd64 (
> >  }
> >
> >  NumEp = IfDesc->NumEndpoints;
> > +if ((NumEp == 0) && (MaxDci == 0)) {
> > +  MaxDci = 1;
> > +}
> >
> >  EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
> >  for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
> > --
> > 2.37.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97602): https://edk2.groups.io/g/devel/message/97602
Mute This Topic: https://groups.io/mt/95582668/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch

Re: [edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-11 Thread Wu, Hao A
For the 3 patches:
[PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block
[PATCH V2] MdeModulePkg/Usb: Read a large number of blocks
[PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

I found that they will cause CI failures: 
https://github.com/tianocore/edk2/pull/3749
Could you help to update them and help to ensure they can pass the CI test? 
Thanks in advance.

Best Regards,
Hao Wu

> -Original Message-
> From: abner.ch...@amd.com 
> Sent: Saturday, December 10, 2022 11:08 PM
> To: devel@edk2.groups.io
> Cc: kuei-hung@amd.com; Wu, Hao A ; Ni, Ray
> ; Garrett Kirkendall ;
> Abner Chang 
> Subject: [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context
> value
> 
> From: Abner Chang 
> 
> In V3: Add AMD copyright.
> In V2: Remove the signed-off-by: Abner Chang.
> 
> Initialize XHCI DCI slot's context entries value.
> 
> Signed-off-by: Kuei-Hung Lin 
> Cc: Hao A Wu 
> Cc: Ray Ni 
> Cc: Garrett Kirkendall 
> Cc: Abner Chang 
> ---
>  MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
>  MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> index 13b0400e83d..f08722905f3 100644
> --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
> @@ -4,6 +4,7 @@
> 
>  Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
>  Copyright (c) Microsoft Corporation.
> +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
>MaxDci = 0;
> 
>NumEp = IfDesc->NumEndpoints;
> +  if (NumEp == 0) {
> +MaxDci = 1;
> +  }
> 
>EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
>for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
> @@ -3006,6 +3010,9 @@ XhcInitializeEndpointContext64 (
>MaxDci = 0;
> 
>NumEp = IfDesc->NumEndpoints;
> +  if (NumEp == 0) {
> +MaxDci = 1;
> +  }
> 
>EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
>for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
> diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> index cc597a43717..8400c90f7ad 100644
> --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> @@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based
> on gPeiUsbControllerPpiGuid
>  which is used to enable recovery function from USB Drivers.
> 
>  Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
> +Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
> 
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -1752,6 +1753,9 @@ XhcPeiSetConfigCmd (
>  }
> 
>  NumEp = IfDesc->NumEndpoints;
> +if ((NumEp == 0) && (MaxDci == 0)) {
> +  MaxDci = 1;
> +}
> 
>  EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
>  for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
> @@ -1974,6 +1978,9 @@ XhcPeiSetConfigCmd64 (
>  }
> 
>  NumEp = IfDesc->NumEndpoints;
> +if ((NumEp == 0) && (MaxDci == 0)) {
> +  MaxDci = 1;
> +}
> 
>  EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
>  for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
> --
> 2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97240): https://edk2.groups.io/g/devel/message/97240
Mute This Topic: https://groups.io/mt/95582668/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH V3] MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value

2022-12-10 Thread Chang, Abner via groups.io
From: Abner Chang 

In V3: Add AMD copyright.
In V2: Remove the signed-off-by: Abner Chang.

Initialize XHCI DCI slot's context entries value.

Signed-off-by: Kuei-Hung Lin 
Cc: Hao A Wu 
Cc: Ray Ni 
Cc: Garrett Kirkendall 
Cc: Abner Chang 
---
 MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 7 +++
 MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c | 7 +++
 2 files changed, 14 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c 
b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
index 13b0400e83d..f08722905f3 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
@@ -4,6 +4,7 @@
 
 Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
 Copyright (c) Microsoft Corporation.
+Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -2807,6 +2808,9 @@ XhcInitializeEndpointContext (
   MaxDci = 0;
 
   NumEp = IfDesc->NumEndpoints;
+  if (NumEp == 0) {
+MaxDci = 1;
+  }
 
   EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
   for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
@@ -3006,6 +3010,9 @@ XhcInitializeEndpointContext64 (
   MaxDci = 0;
 
   NumEp = IfDesc->NumEndpoints;
+  if (NumEp == 0) {
+MaxDci = 1;
+  }
 
   EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
   for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c 
b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
index cc597a43717..8400c90f7ad 100644
--- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
@@ -3,6 +3,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on 
gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
 Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -1752,6 +1753,9 @@ XhcPeiSetConfigCmd (
 }
 
 NumEp = IfDesc->NumEndpoints;
+if ((NumEp == 0) && (MaxDci == 0)) {
+  MaxDci = 1;
+}
 
 EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
 for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
@@ -1974,6 +1978,9 @@ XhcPeiSetConfigCmd64 (
 }
 
 NumEp = IfDesc->NumEndpoints;
+if ((NumEp == 0) && (MaxDci == 0)) {
+  MaxDci = 1;
+}
 
 EpDesc = (USB_ENDPOINT_DESCRIPTOR *)(IfDesc + 1);
 for (EpIndex = 0; EpIndex < NumEp; EpIndex++) {
-- 
2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97226): https://edk2.groups.io/g/devel/message/97226
Mute This Topic: https://groups.io/mt/95582668/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-