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:   Tue, 5 Dec 2017 18:28:52 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Richard Leitner <dev@...l1n.net>
Cc:     robh+dt@...nel.org, mark.rutland@....com, fugang.duan@....com,
        f.fainelli@...il.com, frowand.list@...il.com, davem@...emloft.net,
        geert+renesas@...der.be, sergei.shtylyov@...entembedded.com,
        baruch@...s.co.il, david.wu@...k-chips.com, lukma@...x.de,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, richard.leitner@...data.com
Subject: Re: [PATCH net-next v3 1/4] phylib: Add device reset delay support

Hi Richard

> +++ b/drivers/of/of_mdio.c
> @@ -77,6 +77,14 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio,
>  	if (of_property_read_bool(child, "broken-turn-around"))
>  		mdio->phy_ignore_ta_mask |= 1 << addr;
>  
> +	if (of_property_read_u32(child, "reset-delay-us",
> +				 &phy->mdio.reset_delay))
> +		phy->mdio.reset_delay = 0;
> +
> +	if (of_property_read_u32(child, "reset-post-delay-us",
> +				 &phy->mdio.reset_post_delay))
> +		phy->mdio.reset_post_delay = 0;

of_property_read_u32() should not change the variable you pass to it,
if it does not find the property. So you can change this to:

	phy->mdio.reset_delay = 0;
	phy->mdio.reset_post_delay = 0;

	of_property_read_u32(child, "reset-delay-us",
			     &phy->mdio.reset_delay);

	of_property_read_u32(child, "reset-post-delay-us",
			     &phy->mdio.reset_post_delay);


     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ