public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
@ 2023-05-23 17:07 Neo Hsueh
  2023-05-24  0:33 ` Chang, Abner
  2023-05-31  3:29 ` [edk2-devel] " Wu, Hao A
  0 siblings, 2 replies; 12+ messages in thread
From: Neo Hsueh @ 2023-05-23 17:07 UTC (permalink / raw)
  To: devel; +Cc: jiangang.he, abner.chang, Neo Hsueh

If there is no port multiplier, PortMultiplierPort should be converted
to 0 to follow AHCI spec.
The same logic already applied in AtaAtapiPassThruDxe driver.

Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
---
 MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
index cd55272c96..7bd04661d0 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
@@ -3,6 +3,7 @@
   mode at PEI phase.
 
   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -92,6 +93,15 @@ AhciPassThruExecute (
 {
   EFI_STATUS  Status;
 
+  if (PortMultiplierPort == 0xFFFF) {
+    //
+    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
+    // according to UEFI spec. Here, we convert its value to 0 to follow
+    // AHCI spec.
+    //
+    PortMultiplierPort = 0;
+  }
+
   switch (Packet->Protocol) {
     case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
       Status = AhciNonDataTransfer (
-- 
2.40.0.windows.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-05-23 17:07 [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Neo Hsueh
@ 2023-05-24  0:33 ` Chang, Abner
  2023-05-31  3:29 ` [edk2-devel] " Wu, Hao A
  1 sibling, 0 replies; 12+ messages in thread
From: Chang, Abner @ 2023-05-24  0:33 UTC (permalink / raw)
  To: Hsueh, Hong-Chih (Neo), devel@edk2.groups.io
  Cc: He, Jiangang, Hao A Wu, Ray Ni

[AMD Official Use Only - General]

Hi Neo,
I don't see you add the maintainers either in commit message or email CC list. I added them.

To this patch,  Acked-by: Abner Chang <abner.chang@amd.com>

Thanks
Abner


> -----Original Message-----
> From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
> Sent: Wednesday, May 24, 2023 1:07 AM
> To: devel@edk2.groups.io
> Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner
> <Abner.Chang@amd.com>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com>
> Subject: [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
>
> If there is no port multiplier, PortMultiplierPort should be converted
> to 0 to follow AHCI spec.
> The same logic already applied in AtaAtapiPassThruDxe driver.
>
> Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> ---
>  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> index cd55272c96..7bd04661d0 100644
> --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> @@ -3,6 +3,7 @@
>    mode at PEI phase.
>
>    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -92,6 +93,15 @@ AhciPassThruExecute (
>  {
>    EFI_STATUS  Status;
>
> +  if (PortMultiplierPort == 0xFFFF) {
> +    //
> +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> +    // according to UEFI spec. Here, we convert its value to 0 to follow
> +    // AHCI spec.
> +    //
> +    PortMultiplierPort = 0;
> +  }
> +
>    switch (Packet->Protocol) {
>      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
>        Status = AhciNonDataTransfer (
> --
> 2.40.0.windows.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-05-23 17:07 [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Neo Hsueh
  2023-05-24  0:33 ` Chang, Abner
@ 2023-05-31  3:29 ` Wu, Hao A
  2023-05-31 14:48   ` He, Jiangang
  1 sibling, 1 reply; 12+ messages in thread
From: Wu, Hao A @ 2023-05-31  3:29 UTC (permalink / raw)
  To: devel@edk2.groups.io, Hong-Chih.Hsueh@amd.com
  Cc: jiangang.he@amd.com, abner.chang@amd.com

Thanks, the code changes look good to me.
May I know what tests have been performed for the patch?

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Neo
> Hsueh via groups.io
> Sent: Wednesday, May 24, 2023 1:07 AM
> To: devel@edk2.groups.io
> Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh <Hong-
> Chih.Hsueh@amd.com>
> Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
> 
> If there is no port multiplier, PortMultiplierPort should be converted
> to 0 to follow AHCI spec.
> The same logic already applied in AtaAtapiPassThruDxe driver.
> 
> Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> ---
>  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> index cd55272c96..7bd04661d0 100644
> --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> @@ -3,6 +3,7 @@
>    mode at PEI phase.
> 
>    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -92,6 +93,15 @@ AhciPassThruExecute (
>  {
>    EFI_STATUS  Status;
> 
> +  if (PortMultiplierPort == 0xFFFF) {
> +    //
> +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> +    // according to UEFI spec. Here, we convert its value to 0 to follow
> +    // AHCI spec.
> +    //
> +    PortMultiplierPort = 0;
> +  }
> +
>    switch (Packet->Protocol) {
>      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
>        Status = AhciNonDataTransfer (
> --
> 2.40.0.windows.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-05-31  3:29 ` [edk2-devel] " Wu, Hao A
@ 2023-05-31 14:48   ` He, Jiangang
  2023-06-02  3:14     ` Wu, Hao A
  0 siblings, 1 reply; 12+ messages in thread
From: He, Jiangang @ 2023-05-31 14:48 UTC (permalink / raw)
  To: Wu, Hao A, devel@edk2.groups.io, Hsueh, Hong-Chih (Neo); +Cc: Chang, Abner

[AMD Official Use Only - General]

We did crisis recovery and Opal HD password unlock from S3 resume from SATA HD test on two different version of AHCI host controllers.

Thanks,
Jiangang
-----Original Message-----
From: Wu, Hao A <hao.a.wu@intel.com>
Sent: Tuesday, May 30, 2023 10:30 PM
To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner <Abner.Chang@amd.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks, the code changes look good to me.
May I know what tests have been performed for the patch?

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Neo
> Hsueh via groups.io
> Sent: Wednesday, May 24, 2023 1:07 AM
> To: devel@edk2.groups.io
> Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh <Hong-
> Chih.Hsueh@amd.com>
> Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> in AhciPei PEIM
>
> If there is no port multiplier, PortMultiplierPort should be converted
> to 0 to follow AHCI spec.
> The same logic already applied in AtaAtapiPassThruDxe driver.
>
> Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> ---
>  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> index cd55272c96..7bd04661d0 100644
> --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> @@ -3,6 +3,7 @@
>    mode at PEI phase.
>
>    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> + reserved.<BR>
>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
>    EFI_STATUS  Status;
>
> +  if (PortMultiplierPort == 0xFFFF) {
> +    //
> +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> +    // according to UEFI spec. Here, we convert its value to 0 to follow
> +    // AHCI spec.
> +    //
> +    PortMultiplierPort = 0;
> +  }
> +
>    switch (Packet->Protocol) {
>      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
>        Status = AhciNonDataTransfer (
> --
> 2.40.0.windows.1
>
>
>
> 
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-05-31 14:48   ` He, Jiangang
@ 2023-06-02  3:14     ` Wu, Hao A
  2023-06-02 14:37       ` hong-chih.hsueh
  2023-06-07  3:21       ` Wu, Hao A
  0 siblings, 2 replies; 12+ messages in thread
From: Wu, Hao A @ 2023-06-02  3:14 UTC (permalink / raw)
  To: He, Jiangang, devel@edk2.groups.io, Hsueh, Hong-Chih (Neo); +Cc: Chang, Abner

Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com>; devel@edk2.groups.io; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com>
> Cc: Chang, Abner <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
> 
> [AMD Official Use Only - General]
> 
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
> 
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com>
> Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner
> <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
> 
> Best Regards,
> Hao Wu
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io
> > Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> > 
> >


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-02  3:14     ` Wu, Hao A
@ 2023-06-02 14:37       ` hong-chih.hsueh
  2023-06-02 16:31         ` Chang, Abner
  2023-06-07  3:21       ` Wu, Hao A
  1 sibling, 1 reply; 12+ messages in thread
From: hong-chih.hsueh @ 2023-06-02 14:37 UTC (permalink / raw)
  To: Wu, Hao A, He, Jiangang, devel@edk2.groups.io; +Cc: Chang, Abner

[-- Attachment #1: Type: text/plain, Size: 3994 bytes --]

[AMD Official Use Only - General]

Hi Hao,

Thank you for your review.

I already created a pull request for this commit, may I know how to proceed to merge it into master?

https://github.com/tianocore/edk2/pull/4424


Regards,
Neo
________________________________
From: Wu, Hao A <hao.a.wu@intel.com>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
Cc: Chang, Abner <Abner.Chang@amd.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com>; devel@edk2.groups.io; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com>
> Cc: Chang, Abner <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com>
> Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner
> <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io
> > Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> > 
> >


[-- Attachment #2: Type: text/html, Size: 7582 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-02 14:37       ` hong-chih.hsueh
@ 2023-06-02 16:31         ` Chang, Abner
  2023-06-02 18:11           ` Hsueh, Hong-Chih (Neo)
  0 siblings, 1 reply; 12+ messages in thread
From: Chang, Abner @ 2023-06-02 16:31 UTC (permalink / raw)
  To: Hsueh, Hong-Chih (Neo), Wu, Hao A, He, Jiangang,
	devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 5404 bytes --]

[AMD Official Use Only - General]

Hi Leo,
Please add Hao's RB in the commit message below your signed-off-by, thus we know this patch has been reviewed.
I also suggest to update your commit subject to "MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM".

Please resend the PR with above updates, then Hao will add "Push" label to this PR once your change passed CI.

Thanks
Abner



From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A <hao.a.wu@intel.com>; He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io
Cc: Chang, Abner <Abner.Chang@amd.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]

Hi Hao,

Thank you for your review.

I already created a pull request for this commit, may I know how to proceed to merge it into master?

https://github.com/tianocore/edk2/pull/4424


Regards,
Neo
________________________________
From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> Cc: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; Chang, Abner
> <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > Cc: jiangang.he@amd.com<mailto:jiangang.he@amd.com>; abner.chang@amd.com<mailto:abner.chang@amd.com>; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> > 
> >

[-- Attachment #2: Type: text/html, Size: 11488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-02 16:31         ` Chang, Abner
@ 2023-06-02 18:11           ` Hsueh, Hong-Chih (Neo)
  2023-06-05  4:31             ` Wu, Hao A
  0 siblings, 1 reply; 12+ messages in thread
From: Hsueh, Hong-Chih (Neo) @ 2023-06-02 18:11 UTC (permalink / raw)
  To: Chang, Abner, Wu, Hao A, He, Jiangang, devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 6032 bytes --]

[AMD Official Use Only - General]

Hi Abner,

Thank you for your feedback. I updated the commit and re-create the PR as below:
https://github.com/tianocore/edk2/pull/4471

Regards,
Neo

________________________________
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Friday, June 2, 2023 11:31 AM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>; Wu, Hao A <hao.a.wu@intel.com>; He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]


Hi Leo,

Please add Hao’s RB in the commit message below your signed-off-by, thus we know this patch has been reviewed.

I also suggest to update your commit subject to “MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM”.



Please resend the PR with above updates, then Hao will add “Push” label to this PR once your change passed CI.



Thanks

Abner







From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A <hao.a.wu@intel.com>; He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io
Cc: Chang, Abner <Abner.Chang@amd.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]



Hi Hao,



Thank you for your review.



I already created a pull request for this commit, may I know how to proceed to merge it into master?



https://github.com/tianocore/edk2/pull/4424





Regards,

Neo

________________________________

From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> Cc: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; Chang, Abner
> <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > Cc: jiangang.he@amd.com<mailto:jiangang.he@amd.com>; abner.chang@amd.com<mailto:abner.chang@amd.com>; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> > 
> >

[-- Attachment #2: Type: text/html, Size: 15314 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-02 18:11           ` Hsueh, Hong-Chih (Neo)
@ 2023-06-05  4:31             ` Wu, Hao A
  2023-06-06  2:24               ` Wu, Hao A
  0 siblings, 1 reply; 12+ messages in thread
From: Wu, Hao A @ 2023-06-05  4:31 UTC (permalink / raw)
  To: Hsueh, Hong-Chih (Neo), Chang, Abner, He, Jiangang,
	devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 6868 bytes --]

Thanks all,

Tried to merge the patch via PR - https://github.com/tianocore/edk2/pull/4478, but failed 3 times (all due to some canceled CI tests).
Will re-try tomorrow.

Best Regards,
Hao Wu

From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
Sent: Saturday, June 3, 2023 2:12 AM
To: Chang, Abner <Abner.Chang@amd.com>; Wu, Hao A <hao.a.wu@intel.com>; He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]

Hi Abner,

Thank you for your feedback. I updated the commit and re-create the PR as below:
https://github.com/tianocore/edk2/pull/4471

Regards,
Neo

________________________________
From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Friday, June 2, 2023 11:31 AM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]


Hi Leo,

Please add Hao's RB in the commit message below your signed-off-by, thus we know this patch has been reviewed.

I also suggest to update your commit subject to "MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM".



Please resend the PR with above updates, then Hao will add "Push" label to this PR once your change passed CI.



Thanks

Abner







From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]



Hi Hao,



Thank you for your review.



I already created a pull request for this commit, may I know how to proceed to merge it into master?



https://github.com/tianocore/edk2/pull/4424





Regards,

Neo

________________________________

From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> Cc: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; Chang, Abner
> <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > Cc: jiangang.he@amd.com<mailto:jiangang.he@amd.com>; abner.chang@amd.com<mailto:abner.chang@amd.com>; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> > 
> >

[-- Attachment #2: Type: text/html, Size: 15505 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-05  4:31             ` Wu, Hao A
@ 2023-06-06  2:24               ` Wu, Hao A
  2023-06-06  7:20                 ` Chang, Abner
  0 siblings, 1 reply; 12+ messages in thread
From: Wu, Hao A @ 2023-06-06  2:24 UTC (permalink / raw)
  To: Andrew Fish, Leif Lindholm, Kinney, Michael D, Gao, Liming,
	devel@edk2.groups.io, Hsueh, Hong-Chih (Neo), Chang, Abner,
	He, Jiangang

[-- Attachment #1: Type: text/plain, Size: 7594 bytes --]

Add Stewards.

I cannot merge PR https://github.com/tianocore/edk2/pull/4478 due to constant cancelled CI tests.
Could someone help with the situation or help to merge the change? Thanks in advance.

Best Regards,
Hao Wu

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wu, Hao A
Sent: Monday, June 5, 2023 12:32 PM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>; Chang, Abner <Abner.Chang@amd.com>; He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

Thanks all,

Tried to merge the patch via PR - https://github.com/tianocore/edk2/pull/4478, but failed 3 times (all due to some canceled CI tests).
Will re-try tomorrow.

Best Regards,
Hao Wu

From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Sent: Saturday, June 3, 2023 2:12 AM
To: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]

Hi Abner,

Thank you for your feedback. I updated the commit and re-create the PR as below:
https://github.com/tianocore/edk2/pull/4471

Regards,
Neo

________________________________
From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Friday, June 2, 2023 11:31 AM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]


Hi Leo,

Please add Hao's RB in the commit message below your signed-off-by, thus we know this patch has been reviewed.

I also suggest to update your commit subject to "MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM".



Please resend the PR with above updates, then Hao will add "Push" label to this PR once your change passed CI.



Thanks

Abner







From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]



Hi Hao,



Thank you for your review.



I already created a pull request for this commit, may I know how to proceed to merge it into master?



https://github.com/tianocore/edk2/pull/4424





Regards,

Neo

________________________________

From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> Cc: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; Chang, Abner
> <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > Cc: jiangang.he@amd.com<mailto:jiangang.he@amd.com>; abner.chang@amd.com<mailto:abner.chang@amd.com>; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> >
> >


[-- Attachment #2: Type: text/html, Size: 16941 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-06  2:24               ` Wu, Hao A
@ 2023-06-06  7:20                 ` Chang, Abner
  0 siblings, 0 replies; 12+ messages in thread
From: Chang, Abner @ 2023-06-06  7:20 UTC (permalink / raw)
  To: Wu, Hao A, Andrew Fish, Leif Lindholm, Kinney, Michael D,
	Gao, Liming, devel@edk2.groups.io, Hsueh, Hong-Chih (Neo),
	He, Jiangang

[-- Attachment #1: Type: text/plain, Size: 8610 bytes --]

[AMD Official Use Only - General]

I can't retrigger the CI to try it. @Kinney, Michael D<mailto:michael.d.kinney@intel.com>, could you please help to retrigger it?

Thanks
Abner

From: Wu, Hao A <hao.a.wu@intel.com>
Sent: Tuesday, June 6, 2023 10:25 AM
To: Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>; Chang, Abner <Abner.Chang@amd.com>; He, Jiangang <Jiangang.He@amd.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Add Stewards.

I cannot merge PR https://github.com/tianocore/edk2/pull/4478 due to constant cancelled CI tests.
Could someone help with the situation or help to merge the change? Thanks in advance.

Best Regards,
Hao Wu

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Wu, Hao A
Sent: Monday, June 5, 2023 12:32 PM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>; Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

Thanks all,

Tried to merge the patch via PR - https://github.com/tianocore/edk2/pull/4478, but failed 3 times (all due to some canceled CI tests).
Will re-try tomorrow.

Best Regards,
Hao Wu

From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Sent: Saturday, June 3, 2023 2:12 AM
To: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]

Hi Abner,

Thank you for your feedback. I updated the commit and re-create the PR as below:
https://github.com/tianocore/edk2/pull/4471

Regards,
Neo

________________________________
From: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Sent: Friday, June 2, 2023 11:31 AM
To: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM


[AMD Official Use Only - General]


Hi Leo,

Please add Hao's RB in the commit message below your signed-off-by, thus we know this patch has been reviewed.

I also suggest to update your commit subject to "MdeModulePkg/Bus: Fix port multiplier port in AhciPei PEIM".



Please resend the PR with above updates, then Hao will add "Push" label to this PR once your change passed CI.



Thanks

Abner







From: Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]



Hi Hao,



Thank you for your review.



I already created a pull request for this commit, may I know how to proceed to merge it into master?



https://github.com/tianocore/edk2/pull/4424





Regards,

Neo

________________________________

From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM



[AMD Official Use Only - General]

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Thanks.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

Best Regards,
Hao Wu

> -----Original Message-----
> From: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-
> Chih (Neo) <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> Cc: Chang, Abner <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-
> Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> Cc: He, Jiangang <Jiangang.He@amd.com<mailto:Jiangang.He@amd.com>>; Chang, Abner
> <Abner.Chang@amd.com<mailto:Abner.Chang@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Thanks, the code changes look good to me.
> May I know what tests have been performed for the patch?
>
> Best Regards,
> Hao Wu
>
> > -----Original Message-----
> > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Neo
> > Hsueh via groups.io
> > Sent: Wednesday, May 24, 2023 1:07 AM
> > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > Cc: jiangang.he@amd.com<mailto:jiangang.he@amd.com>; abner.chang@amd.com<mailto:abner.chang@amd.com>; Neo Hsueh <Hong-
> > Chih.Hsueh@amd.com<mailto:Chih.Hsueh@amd.com>>
> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > in AhciPei PEIM
> >
> > If there is no port multiplier, PortMultiplierPort should be converted
> > to 0 to follow AHCI spec.
> > The same logic already applied in AtaAtapiPassThruDxe driver.
> >
> > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com<mailto:Hong-Chih.Hsueh@amd.com>>
> > ---
> >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > index cd55272c96..7bd04661d0 100644
> > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > @@ -3,6 +3,7 @@
> >    mode at PEI phase.
> >
> >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > + reserved.<BR>
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> >    EFI_STATUS  Status;
> >
> > +  if (PortMultiplierPort == 0xFFFF) {
> > +    //
> > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > +    // AHCI spec.
> > +    //
> > +    PortMultiplierPort = 0;
> > +  }
> > +
> >    switch (Packet->Protocol) {
> >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> >        Status = AhciNonDataTransfer (
> > --
> > 2.40.0.windows.1
> >
> >
> >
> >
> >


[-- Attachment #2: Type: text/html, Size: 19742 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM
  2023-06-02  3:14     ` Wu, Hao A
  2023-06-02 14:37       ` hong-chih.hsueh
@ 2023-06-07  3:21       ` Wu, Hao A
  1 sibling, 0 replies; 12+ messages in thread
From: Wu, Hao A @ 2023-06-07  3:21 UTC (permalink / raw)
  To: He, Jiangang, devel@edk2.groups.io, Hsueh, Hong-Chih (Neo); +Cc: Chang, Abner

Merged via:
PR - https://github.com/tianocore/edk2/pull/4478
Commit - https://github.com/tianocore/edk2/commit/67fc78d026490ea4c375eeb19724abb40e7be8f2

Best Regards,
Hao Wu

> -----Original Message-----
> From: Wu, Hao A
> Sent: Friday, June 2, 2023 11:14 AM
> To: He, Jiangang <Jiangang.He@amd.com>; devel@edk2.groups.io; Hsueh,
> Hong-Chih (Neo) <Hong-Chih.Hsueh@amd.com>
> Cc: Chang, Abner <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
> 
> Thanks.
> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
> 
> Best Regards,
> Hao Wu
> 
> > -----Original Message-----
> > From: He, Jiangang <Jiangang.He@amd.com>
> > Sent: Wednesday, May 31, 2023 10:49 PM
> > To: Wu, Hao A <hao.a.wu@intel.com>; devel@edk2.groups.io; Hsueh,
> Hong-
> > Chih (Neo) <Hong-Chih.Hsueh@amd.com>
> > Cc: Chang, Abner <Abner.Chang@amd.com>
> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier
> > port in AhciPei PEIM
> >
> > [AMD Official Use Only - General]
> >
> > We did crisis recovery and Opal HD password unlock from S3 resume from
> > SATA HD test on two different version of AHCI host controllers.
> >
> > Thanks,
> > Jiangang
> > -----Original Message-----
> > From: Wu, Hao A <hao.a.wu@intel.com>
> > Sent: Tuesday, May 30, 2023 10:30 PM
> > To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) <Hong-
> > Chih.Hsueh@amd.com>
> > Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner
> > <Abner.Chang@amd.com>
> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier
> > port in AhciPei PEIM
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Thanks, the code changes look good to me.
> > May I know what tests have been performed for the patch?
> >
> > Best Regards,
> > Hao Wu
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Neo
> > > Hsueh via groups.io
> > > Sent: Wednesday, May 24, 2023 1:07 AM
> > > To: devel@edk2.groups.io
> > > Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh <Hong-
> > > Chih.Hsueh@amd.com>
> > > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > > in AhciPei PEIM
> > >
> > > If there is no port multiplier, PortMultiplierPort should be
> > > converted to 0 to follow AHCI spec.
> > > The same logic already applied in AtaAtapiPassThruDxe driver.
> > >
> > > Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
> > > ---
> > >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++
> > >  1 file changed, 10 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > index cd55272c96..7bd04661d0 100644
> > > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > @@ -3,6 +3,7 @@
> > >    mode at PEI phase.
> > >
> > >    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> > > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > > + reserved.<BR>
> > >
> > >    SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> > >    EFI_STATUS  Status;
> > >
> > > +  if (PortMultiplierPort == 0xFFFF) {
> > > +    //
> > > +    // If there is no port multiplier, PortMultiplierPort will be 0xFFFF
> > > +    // according to UEFI spec. Here, we convert its value to 0 to follow
> > > +    // AHCI spec.
> > > +    //
> > > +    PortMultiplierPort = 0;
> > > +  }
> > > +
> > >    switch (Packet->Protocol) {
> > >      case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> > >        Status = AhciNonDataTransfer (
> > > --
> > > 2.40.0.windows.1
> > >
> > >
> > >
> > > 
> > >


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-07  3:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23 17:07 [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Neo Hsueh
2023-05-24  0:33 ` Chang, Abner
2023-05-31  3:29 ` [edk2-devel] " Wu, Hao A
2023-05-31 14:48   ` He, Jiangang
2023-06-02  3:14     ` Wu, Hao A
2023-06-02 14:37       ` hong-chih.hsueh
2023-06-02 16:31         ` Chang, Abner
2023-06-02 18:11           ` Hsueh, Hong-Chih (Neo)
2023-06-05  4:31             ` Wu, Hao A
2023-06-06  2:24               ` Wu, Hao A
2023-06-06  7:20                 ` Chang, Abner
2023-06-07  3:21       ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox