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]
Message-Id: <20180820121238.7779-3-a.fatoum@pengutronix.de>
Date:   Mon, 20 Aug 2018 14:12:37 +0200
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>
Cc:     kernel@...gutronix.de, netdev@...r.kernel.org, mdf@...nel.org,
        Brad Mouring <brad.mouring@...com>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: [PATCH 3/4] net: macb: Support specifying PHYs in a mdio container dts node

To align macb DT entries with those of other MACs.
For backwards compatibility, the old way remains supported.

Suggested-by: Andrew Lunn <andrew@...n.ch>
Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
---
 drivers/net/ethernet/cadence/macb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index ef6ce8691443..2ebc5698db9d 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -596,10 +596,10 @@ static int macb_mii_init(struct macb *bp)
 
 		err = mdiobus_register(bp->mii_bus);
 	} else {
+		struct device_node *node = of_get_child_by_name(np, "mdio") ?: np;
 		if (pdata)
 			bp->mii_bus->phy_mask = pdata->phy_mask;
-
-		err = of_mdiobus_register(bp->mii_bus, np);
+		err = of_mdiobus_register(bp->mii_bus, node);
 	}
 
 	if (err)
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ