Re: [RFC PATCH v2 0/2] fw_devlink overlay fix
From: Herve Codina
Date: Tue Apr 09 2024 - 09:03:18 EST
Hi Saravana,
+CC Luca and Thomas
On Mon, 8 Apr 2024 22:37:01 -0700
Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
> Don't bother reviewing this patch. It needs to be tested and possibly
> refactored first.
>
> Geert and Herve,
>
> This patch serious should hopefully fix both of your use cases
> [1][2][3]. Can you please check to make sure the device links created
> to/from the overlay devices are to/from the right ones?
>
> I've only compile tested it. If I made some obvious mistake, feel free
> to fix it and give it a shot.
>
> Cc: Rob Herring <robh@xxxxxxxxxx>
>
> [1] - https://lore.kernel.org/lkml/CAMuHMdXEnSD4rRJ-o90x4OprUacN_rJgyo8x6=9F9rZ+-KzjOg@xxxxxxxxxxxxxx/
> [2] - https://lore.kernel.org/all/20240221095137.616d2aaa@xxxxxxxxxxx/
> [3] - https://lore.kernel.org/lkml/20240312151835.29ef62a0@xxxxxxxxxxx/
>
I tested your patches.
Concerning my use cases, they fix the issue described in
https://lore.kernel.org/all/20240221095137.616d2aaa@xxxxxxxxxxx/
But not the one described in
https://lore.kernel.org/lkml/20240312151835.29ef62a0@xxxxxxxxxxx/
A link is still present between the i2c@600 and the PCI device.
instead of the i2c@600 and the pci-ep-bus.
Adding the patch clearing the FWNODE_FLAG_NOT_DEVICE in device_add() available
at [1] on top of your patches fixes the link issue.
With this additional patch applied, the link is present between the i2c@600
and the pci-ep-bus.
[1] https://lore.kernel.org/lkml/20240220111044.133776-2-herve.codina@xxxxxxxxxxx/
Best regards,
Hervé