[PATCH] mem/cxl_type3: fix GPF DVSEC

Tong Zhang posted 1 patch 3 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220915175853.2902-1-t.zhang2@samsung.com
Maintainers: Ben Widawsky <ben.widawsky@intel.com>, Jonathan Cameron <jonathan.cameron@huawei.com>
hw/mem/cxl_type3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] mem/cxl_type3: fix GPF DVSEC
Posted by Tong Zhang 3 years, 4 months ago
The structure is for device dvsec not port dvsec. Change type to fix
this issue.

Signed-off-by: Tong Zhang <t.zhang2@samsung.com>
---
 hw/mem/cxl_type3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index 3bf2869573..ada2108fac 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -49,7 +49,7 @@ static void build_dvsecs(CXLType3Dev *ct3d)
         .phase2_power = 0x33, /* 0x33 miliwatts */
     };
     cxl_component_create_dvsec(cxl_cstate, CXL2_TYPE3_DEVICE,
-                               GPF_DEVICE_DVSEC_LENGTH, GPF_PORT_DVSEC,
+                               GPF_DEVICE_DVSEC_LENGTH, GPF_DEVICE_DVSEC,
                                GPF_DEVICE_DVSEC_REVID, dvsec);
 }
 
-- 
2.25.1
Re: [PATCH] mem/cxl_type3: fix GPF DVSEC
Posted by Laurent Vivier 3 years, 4 months ago
Le 15/09/2022 à 19:59, Tong Zhang a écrit :
> The structure is for device dvsec not port dvsec. Change type to fix
> this issue.
> 
> Signed-off-by: Tong Zhang <t.zhang2@samsung.com>
> ---
>   hw/mem/cxl_type3.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
> index 3bf2869573..ada2108fac 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -49,7 +49,7 @@ static void build_dvsecs(CXLType3Dev *ct3d)
>           .phase2_power = 0x33, /* 0x33 miliwatts */
>       };
>       cxl_component_create_dvsec(cxl_cstate, CXL2_TYPE3_DEVICE,
> -                               GPF_DEVICE_DVSEC_LENGTH, GPF_PORT_DVSEC,
> +                               GPF_DEVICE_DVSEC_LENGTH, GPF_DEVICE_DVSEC,
>                                  GPF_DEVICE_DVSEC_REVID, dvsec);
>   }
>   

Applied to my trivial-patches branch.

Thanks,
Laurent


Re: [PATCH] mem/cxl_type3: fix GPF DVSEC
Posted by Jonathan Cameron via 3 years, 4 months ago
On Thu, 15 Sep 2022 17:59:04 +0000
Tong Zhang <t.zhang2@samsung.com> wrote:

> The structure is for device dvsec not port dvsec. Change type to fix
> this issue.
> 
> Signed-off-by: Tong Zhang <t.zhang2@samsung.com>

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  hw/mem/cxl_type3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
> index 3bf2869573..ada2108fac 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -49,7 +49,7 @@ static void build_dvsecs(CXLType3Dev *ct3d)
>          .phase2_power = 0x33, /* 0x33 miliwatts */
>      };
>      cxl_component_create_dvsec(cxl_cstate, CXL2_TYPE3_DEVICE,
> -                               GPF_DEVICE_DVSEC_LENGTH, GPF_PORT_DVSEC,
> +                               GPF_DEVICE_DVSEC_LENGTH, GPF_DEVICE_DVSEC,
>                                 GPF_DEVICE_DVSEC_REVID, dvsec);
>  }
>