lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Mar 2020 18:57:59 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Dajun Jin <adajunjin@...il.com>
Cc:     hkallweit1@...il.com, linux@...linux.org.uk, robh+dt@...nel.org,
        frowand.list@...il.com, netdev@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH] drivers/of/of_mdio.c:fix of_mdiobus_register()

Hi Dajun

> This is my test in Xilinx zcu106 board.
> 
> dts is liks this:
> ethernet@...e0000 {
>     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@...e0000/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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ