[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1MwZHGBfkgi9X1i@mini>
Date: Fri, 6 Dec 2024 09:12:04 -0800
From: Fan Ni <nifan.cxl@...il.com>
To: alejandro.lucero-palau@....com
Cc: linux-cxl@...r.kernel.org, netdev@...r.kernel.org,
dan.j.williams@...el.com, martin.habets@...inx.com,
edward.cree@....com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com,
Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCH v6 14/28] sfc: create type2 cxl memdev
On Mon, Dec 02, 2024 at 05:12:08PM +0000, alejandro.lucero-palau@....com wrote:
> From: Alejandro Lucero <alucerop@....com>
>
> Use cxl API for creating a cxl memory device using the type2
> cxl_dev_state struct.
>
> Signed-off-by: Alejandro Lucero <alucerop@....com>
Reviewed-by: Fan Ni <fan.ni@...sung.com>
> ---
> drivers/net/ethernet/sfc/efx_cxl.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
> index aa65f227c80d..d03fa9f9c421 100644
> --- a/drivers/net/ethernet/sfc/efx_cxl.c
> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
> @@ -95,10 +95,19 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
> */
> cxl_set_media_ready(cxl->cxlds);
>
> + cxl->cxlmd = devm_cxl_add_memdev(&pci_dev->dev, cxl->cxlds);
> + if (IS_ERR(cxl->cxlmd)) {
> + pci_err(pci_dev, "CXL accel memdev creation failed");
> + rc = PTR_ERR(cxl->cxlmd);
> + goto err3;
> + }
> +
> probe_data->cxl = cxl;
>
> return 0;
>
> +err3:
> + cxl_release_resource(cxl->cxlds, CXL_RES_RAM);
> err2:
> kfree(cxl->cxlds);
> err1:
> --
> 2.17.1
>
Powered by blists - more mailing lists