[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78176881-2514-4059-a0b3-778e521f56a0@amd.com>
Date: Thu, 10 Apr 2025 12:48:23 +0100
From: Alejandro Lucero Palau <alucerop@....com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
alejandro.lucero-palau@....com
Cc: linux-cxl@...r.kernel.org, netdev@...r.kernel.org,
dan.j.williams@...el.com, edward.cree@....com, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v12 08/23] sfc: initialize dpa
On 4/7/25 12:01, Alejandro Lucero Palau wrote:
>
> On 4/4/25 17:12, Jonathan Cameron wrote:
>> On Mon, 31 Mar 2025 15:45:40 +0100
>> alejandro.lucero-palau@....com wrote:
>>
>>> From: Alejandro Lucero <alucerop@....com>
>>>
>>> Use hardcoded values for defining and initializing dpa as there is no
>>> mbox available.
>>>
>>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>>> ---
>>> drivers/net/ethernet/sfc/efx_cxl.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c
>>> b/drivers/net/ethernet/sfc/efx_cxl.c
>>> index 3b705f34fe1b..2c942802b63c 100644
>>> --- a/drivers/net/ethernet/sfc/efx_cxl.c
>>> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
>>> @@ -19,6 +19,7 @@
>>> int efx_cxl_init(struct efx_probe_data *probe_data)
>>> {
>>> + struct cxl_dpa_info sfc_dpa_info = { 0 };
>>> struct efx_nic *efx = &probe_data->efx;
>>> struct pci_dev *pci_dev = efx->pci_dev;
>>> DECLARE_BITMAP(expected, CXL_MAX_CAPS);
>>> @@ -75,6 +76,11 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
>>> */
>>> cxl->cxlds.media_ready = true;
>>> + cxl_mem_dpa_init(&sfc_dpa_info, EFX_CTPIO_BUFFER_SIZE, 0);
>> Maybe it is simpler to just pass in the total size as well?
>> Here that results in a repeated value, but to me it looks simpler
>> than setting parts of info up here and parts outside of
>> cxl_mem_dpa_init()
>
>
> I think it is not needed once we initialize size unconditionally now
> inside cxl_mem_dpa_init().
>
But after my comment in the previous patch, this makes sense now, so
removing the conditional code in cxl_mem_dpa_init.
Thanks
>
>>
>>> + rc = cxl_dpa_setup(&cxl->cxlds, &sfc_dpa_info);
>>> + if (rc)
>>> + return rc;
>>> +
>>> probe_data->cxl = cxl;
>>> return 0;
Powered by blists - more mailing lists