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

Jason Gunthorpe
2024-07-22T15:31:09Z

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?

> @@ -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 ?

Jason