Re: [RFC PATCH 08/13] fwctl/cxl: Add driver for CXL mailbox for handling CXL features commands

Dave Jiang
2024-07-22T21:42:15Z

On 7/22/24 8:31 AM, Jason Gunthorpe wrote:
> On Thu, Jul 18, 2024 at 02:32:26PM -0700, Dave Jiang wrote:
>
>> diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
>> index 9f0fe698414d..0f6ec85ef9c4 100644
>> --- a/drivers/cxl/core/memdev.c
>> +++ b/drivers/cxl/core/memdev.c
>> @@ -13,6 +13,8 @@
>>
>> static DECLARE_RWSEM(cxl_memdev_rwsem);
>>
>> +#define CXL_ADEV_NAME "fwctl-cxl"
>> +
>
> This should be in a header?

yes. will fix.

>
>> @@ -1056,11 +1059,27 @@ struct cxl_memdev *devm_cxl_add_memdev(struct device *host,
>> if (rc)
>> goto err;
>>
>> + adev = &cxlds->cxl_mbox.adev;
>> + adev->id = cxlmd->id;
>> + adev->name = CXL_ADEV_NAME;
>> + adev->dev.parent = dev;
>
> It goes there
>
>> +static const struct auxiliary_device_id cxlctl_id_table[] = {
>> + { .name = "CXL.fwctl", },
>> + {},
>
> But then how does this match work? Shouldn't it be CXL_ADEV_NAME ?

Yes will fix.

>
> Jason