All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Dajun Jin <adajunjin@gmail.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, robh+dt@kernel.org,
	frowand.list@gmail.com, netdev@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] drivers/of/of_mdio.c:fix of_mdiobus_register()
Date: Mon, 2 Mar 2020 18:57:59 +0100	[thread overview]
Message-ID: <20200302175759.GD24912@lunn.ch> (raw)
In-Reply-To: <20200302172919.31425-1-adajunjin@gmail.com>

Hi Dajun

> This is my test in Xilinx zcu106 board.
> 
> dts is liks this:
> ethernet@ff0e0000 {
>     compatible = "cdns,zynqmp-gem", "cdns,gem";
>     status = "okay";
>     ...
>     
>     phy@0 {
>         ti,rx-internal-delay = <0x8>;
>         ti,tx-internal-delay = <0xa>;
>         ti,fifo-depth = <0x1>;
>         ti,rxctrl-strap-worka;
>         linux,phandle = <0x12>;
>         phandle = <0x12>;
>     };
> };
> 
> then when borad is booting,the dmesg is like this:
> [    4.600035] mdio_bus ff0e0000.ethernet-ffffffff: /amba/ethernet@ff0e0000/phy@0 has invalid PHY address
> [    4.600050] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 0
> [    4.602076] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 1
> [    4.603849] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 2
> [    4.605574] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 4
> [    4.607312] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 5
> ...
> [    4.636155] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 28
> [    4.637335] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 29
> [    4.638504] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 30
> [    4.639666] mdio_bus ff0e0000.ethernet-ffffffff: scan phy phy at address 31

For a single PHY without a reg properties, it should do the right
thing. But it will go wrong if there are multiple PHYs without reg
properties. In that case, the break helps.

However, as the comment suggests, you really should have a reg
property.

Please make the commit message better, and then i will give a
reviewed-by.

Thanks
	Andrew

  reply	other threads:[~2020-03-02 17:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-01 16:41 [PATCH] drivers/of/of_mdio.c:fix of_mdiobus_register() Dajun Jin
2020-03-01 16:50 ` Andrew Lunn
2020-03-02 17:29   ` Dajun Jin
2020-03-02 17:57     ` Andrew Lunn [this message]
2020-03-02 18:38       ` Russell King - ARM Linux admin
2020-03-03  4:24       ` Dajun Jin
2020-03-03 22:02         ` Andrew Lunn
2020-03-04  3:02         ` David Miller

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=20200302175759.GD24912@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=adajunjin@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.