linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	kernel-team@android.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] RFC: of: property: fix phy-hanlde issue
Date: Mon, 13 Sep 2021 21:44:07 -0700	[thread overview]
Message-ID: <CAGETcx-qDPETtsSPKyW+6i=c=x2LG-tcJ+zCu40jCa9FwA-bEA@mail.gmail.com> (raw)
In-Reply-To: <CAGETcx8peaew90SWiux=TyvuGgvTQOmO4BFALz7aj0Za5QdNFQ@mail.gmail.com>

On Mon, Sep 13, 2021 at 5:54 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Thu, Sep 9, 2021 at 1:03 AM Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
> >
> > Hi
> >
> > On 08.09.2021 23:58, Saravana Kannan wrote:
> > > This is a test patch. I'll split it up into multiple commits and clean
> > > it up once it's shown to help.
> > >
> > > Marek, can you please test this and let me know if it helps?
> > I've just checked and nope, it doesn't help for my case. Ethernet is
> > still not probed on Amlogic G12A/B SoC based boards. :(
>
> Hi Marek,
>
> Thanks for testing out the patch. Turns out the issue was a lot more
> complicated than I thought. Thanks to a bunch of debug logs that Rob
> provided off-list, I was able to root cause the actual issue.
>
> Looks like the problem is cyclic dependency between the mdio-multiplexer and the
> ethernet:
> ethmac -(phy-handle)-> external_phy -(parent) ->
> mdio-multiplexer -(mdio-bus-parent)-> mdio0 -(parent)-> ethmac
>
> Relevant parts of the DT combined from multiple files and trimmed and
> pasted below.
>
> If fw_devlink sees a cycle, it'll stop enforcing ordering between all
> the devices in the cycle since it can't figure out which one of the
> dependencies isn't real. So, the confusing part was that, when Andrew
> Lunn gave the patch for adding support for "mdio-bus-parent", that
> should have allowed fw_devlink to see the cycle and stop enforcing the
> dependencies. But that didn't happen because of a bug in fw_devlink
> cycle handling (it worked for most cases, but not for this specific
> ordering in DT). I'll send out a fix for that soon.

Here's the fix I promised:
https://lore.kernel.org/lkml/20210914043928.4066136-2-saravanak@google.com/

> That combined with
> Andrew's "mdio-bus-parent" patch should fix things for you.

Fairly certain the fix above and Andrew's patch should fix it for you
if you want to test it. Rob already verified a very similar patch for me.

-Saravana

> But I
> think I'll revert the phy-handle patch for other reasons (I'll explain
> that in the patch that reverts it).
>
>
> Thanks,
> Saravana
>
> ethmac: ethernet@ff3f0000 {
>     compatible = "amlogic,meson-g12a-dwmac"
>
>     phy-handle = <&external_phy>;
>     mdio0: mdio {
>         compatible = "snps,dwmac-mdio";
>     }
> };
>
> mdio-multiplexer {
>     mdio-bus-parent = <&mdio0>;
>
>     ext_mdio: mdio@0 {
>         /* no compatible prop */
>         external_phy: ethernet-phy@0 {
>             /* no compatible prop */
>         }
>     }
> }
>
> -Saravana

  reply	other threads:[~2021-09-14  4:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  2:17 [PATCH v2] of: property: fw_devlink: Add support for "phy-handle" property Saravana Kannan
2021-08-18 17:00 ` Rob Herring
     [not found] ` <CGME20210823120849eucas1p11d3919886444358472be3edd1c662755@eucas1p1.samsung.com>
2021-08-23 12:08   ` Marek Szyprowski
2021-08-23 12:42     ` Rob Herring
2021-08-23 13:16     ` Andrew Lunn
2021-08-23 18:13       ` Saravana Kannan
2021-08-23 19:50         ` Andrew Lunn
2021-08-24  6:52       ` Marek Szyprowski
2021-08-23 18:22     ` Saravana Kannan
2021-08-23 19:58       ` Andrew Lunn
2021-08-23 20:48         ` Saravana Kannan
2021-08-23 22:01           ` Andrew Lunn
2021-08-23 22:08           ` Rob Herring
2021-08-24  7:03       ` Marek Szyprowski
2021-08-24  7:31         ` Saravana Kannan
2021-09-01  2:37           ` Saravana Kannan
2021-09-01  7:22             ` Marek Szyprowski
2021-09-08 21:58               ` [PATCH v1] RFC: of: property: fix phy-hanlde issue Saravana Kannan
2021-09-09  8:03                 ` Marek Szyprowski
2021-09-14  0:54                   ` Saravana Kannan
2021-09-14  4:44                     ` Saravana Kannan [this message]
2021-09-14  6:15                       ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGETcx-qDPETtsSPKyW+6i=c=x2LG-tcJ+zCu40jCa9FwA-bEA@mail.gmail.com' \
    --to=saravanak@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH v1] RFC: of: property: fix phy-hanlde issue' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).