Re: [PATCH] of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 20, 2024 at 11:05 PM John Watts <contact@xxxxxxxxxx> wrote:
>
> On Fri, Feb 23, 2024 at 09:24:35PM -0800, Saravana Kannan wrote:
> > Introduced a stupid bug in commit 782bfd03c3ae ("of: property: Improve
> > finding the supplier of a remote-endpoint property") due to a last minute
> > incorrect edit of "index !=0" into "!index". This patch fixes it to be
> > "index > 0" to match the comment right next to it.
> >
> > Reported-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
> > Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/
> > Fixes: 782bfd03c3ae ("of: property: Improve finding the supplier of a remote-endpoint property")
> > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> > ---
> > Using Link: instead of Closes: because Luca reported two separate issues.
> >
> > Sorry about introducing a stupid bug in an -rcX Rob.
> >
> > -Saravana
>
> Hi there,
>
> Could this be reverted? It breaks my audio-graph-card2 setup:
>
> [   17.116290] platform 2034000.i2s: deferred probe pending: platform: wait for supplier /sound/multi
> [   17.125370] platform test_codec: deferred probe pending: platform: wait for supplier /sound/multi
> [   17.134257] platform sound: deferred probe pending: asoc-audio-graph-card2: parse error

Hmmm.... cycle detection should work here and not enforce probe
ordering. I'd appreciate help with debugging that. Let me look at it
on Monday. Can you enabled all the debug logs in drivers/base/core.c
and tell me what cycle detection is telling about these nodes?

But the better fix would be to use the new "post-init-providers"
property. See below.

>
> / {
>         ...
>
>
>         test_codec {
>                 compatible = "test-codec";
>                 prefix = "Test codec";
>                 #sound-dai-cells = <0>;

post-init-provider = <&multi>;

Right now there's a cyclic dependency between test_codec and multi and
this tells the kernel that test codec needs to probe first.

Similar additions to the other nodes blocked on multi.

Thanks,
Saravana

>                 port {
>                         test_ep: endpoint {
>                                 remote-endpoint = <&card_ep_2>;
>                         };
>                 };
>         };
>
>         sound {
>                 compatible = "audio-graph-card2";
>                 label = "CS5368";
>                 links = <&i2s2_port>;
>                 multi {
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>                         convert-channels = <16>;
>                         port@0 {
>                                 reg = <0>;
>                                 card_ep_0: endpoint {
>                                         remote-endpoint = <&i2s2_ep>;
>                                 };
>                         };
>                         //port@1 {
>                         //      reg = <1>;
>                         //      card_ep_1: endpoint {
>                         //              remote-endpoint = <&cs5368_ep>;
>                         //      };
>                         //};
>                         port@1 {
>                                 reg = <1>;
>                                 card_ep_2: endpoint {
>                                         remote-endpoint = <&test_ep>;
>                                 };
>                         };
>                 };
>         };
> };
>
>
> &i2s2 {
>         pinctrl-0 = <&i2s2_pins>, <&i2s2_din_pins>;
>         pinctrl-names = "default";
>         status = "okay";
>         i2s2_port: port {
>                 i2s2_ep: endpoint {
>                         format = "dsp_a";
>                         bitclock-master;
>                         frame-master;
>                         remote-endpoint = <&card_ep_0>;
>                 };
>         };
> };
>
> John.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux