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, 17 Nov 2020 03:09:56 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Sven Van Asbroeck <thesven73@...il.com>
Cc:     Bryan Whitehead <bryan.whitehead@...rochip.com>,
        David S Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Roelof Berg <rberg@...g-solutions.de>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1] lan743x: replace devicetree phy parse code
 with library function

On Mon, Nov 16, 2020 at 12:01:55PM -0500, Sven Van Asbroeck wrote:
> From: Sven Van Asbroeck <thesven73@...il.com>
> 
> The code in this driver which parses the devicetree to determine
> the phy/fixed link setup, can be replaced by a single library
> function: of_phy_get_and_connect().
> 
> Behaviour is identical, except that the library function will
> complain when 'phy-connection-type' is omitted, instead of
> blindly using PHY_INTERFACE_MODE_NA, which would result in an
> invalid phy configuration.
> 
> The library function no longer brings out the exact phy_mode,
> but the driver doesn't need this, because phy_interface_is_rgmii()
> queries the phydev directly. Remove 'phy_mode' from the private
> adapter struct.
> 
> While we're here, log info about the attached phy on connect,
> this is useful because the phy type and connection method is now
> fully configurable via the devicetree.
> 
> Tested on a lan7430 chip with built-in phy. Verified that adding
> fixed-link/phy-connection-type in the devicetree results in a
> fixed-link setup. Used ethtool to verify that the devicetree
> settings are used.
> 
> Tested-by: Sven Van Asbroeck <thesven73@...il.com> # lan7430
> Signed-off-by: Sven Van Asbroeck <thesven73@...il.com>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ