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:   Sat, 18 Apr 2020 17:00:29 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Calvin Johnson <calvin.johnson@....nxp.com>
Cc:     linux.cj@...il.com, Jeremy Linton <jeremy.linton@....com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Russell King - ARM Linux admin <linux@...linux.org.uk>,
        Cristi Sovaiala <cristian.sovaiala@....com>,
        Florin Laurentiu Chiculita <florinlaurentiu.chiculita@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Madalin Bucur <madalin.bucur@....nxp.com>,
        netdev@...r.kernel.org, Laurentiu Tudor <laurentiu.tudor@....com>,
        linux-acpi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Diana Madalina Craciun <diana.craciun@....com>,
        linux-kernel@...r.kernel.org, Varun Sethi <V.Sethi@....com>,
        Marcin Wojtas <mw@...ihalf.com>,
        "Rajesh V . Bikkina" <rajesh.bikkina@....com>,
        Pankaj Bansal <pankaj.bansal@....com>,
        Makarand Pawagi <makarand.pawagi@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Ioana Radulescu <ruxandra.radulescu@....com>
Subject: Re: [RFC net-next PATCH v2 2/2] net: dpaa2-mac: Add ACPI support for
 DPAA2 MAC driver

> -	err = phylink_of_phy_connect(mac->phylink, dpmac_node, 0);
> +	if (is_of_node(dpmac_node))
> +		err = phylink_of_phy_connect(mac->phylink,
> +					     to_of_node(dpmac_node), 0);
> +	else if (is_acpi_node(dpmac_node)) {
> +		status = acpi_node_get_property_reference(dpmac_node,
> +							  "phy-handle",
> +							  0, &args);
> +		if (ACPI_FAILURE(status))
> +			goto err_phylink_destroy;
> +		phy_dev = fwnode_phy_find_device(args.fwnode);
> +		if (!phy_dev)
> +			goto err_phylink_destroy;
> +
> +		err = phylink_connect_phy(mac->phylink, phy_dev);
> +		if (err)
> +			phy_detach(phy_dev);

So it looks like you need to add a phylink_fwnode_phy_connect(). And
maybe on top of that you need a phylink_device_phy_connect()?

So please stop. Take a step back, look at how the of_, device_,
fwnode_, and acpi_ abstractions all stack on top of each other, then
propose phylib and phylink core changes to implement these
abstractions.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ