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 16:39:03 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc:     Calvin Johnson <calvin.johnson@....nxp.com>, linux.cj@...il.com,
        Jeremy Linton <jeremy.linton@....com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        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>
Subject: Re: [RFC net-next PATCH v2 1/2] net/fsl: add ACPI support for mdio
 bus

> > +static int xgmac_mdiobus_register_phy(struct mii_bus *bus,
> > +				      struct fwnode_handle *child, u32 addr)
> > +{
> > +	struct phy_device *phy;
> > +	bool is_c45 = false;
> > +	int rc;
> > +	const char *cp;
> > +	u32 phy_id;
> > +
> > +	fwnode_property_read_string(child, "compatible", &cp);
> > +	if (!strcmp(cp, "ethernet-phy-ieee802.3-c45"))
> > +		is_c45 = true;
> > +
> > +	if (!is_c45 && !xgmac_get_phy_id(child, &phy_id))
> > +		phy = phy_device_create(bus, addr, phy_id, 0, NULL);
> > +	else
> > +		phy = get_phy_device(bus, addr, is_c45);
> > +	if (IS_ERR(phy))
> > +		return PTR_ERR(phy);
> > +
> > +	phy->irq = bus->irq[addr];
> > +
> > +	/* Associate the fwnode with the device structure so it
> > +	 * can be looked up later.
> > +	 */
> > +	phy->mdio.dev.fwnode = child;
> > +
> > +	/* All data is now stored in the phy struct, so register it */
> > +	rc = phy_device_register(phy);
> > +	if (rc) {
> > +		phy_device_free(phy);
> > +		fwnode_handle_put(child);
> > +		return rc;
> > +	}
> > +
> > +	dev_dbg(&bus->dev, "registered phy at address %i\n", addr);
> > +
> > +	return 0;
> 
> You seem to be duplicating the OF implementation in a private driver,
> converting it to fwnode.  This is not how we develop the Linux kernel.
> We fix subsystem problems by fixing the subsystems, not by throwing
> what should be subsystem code into private drivers.

And i think a similar comment was given for v1, but i could be
remembering wrongly.

	    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ