From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
To: <stable@vger.kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
robin.murphy@arm.com, marc.zyngier@arm.com, afaerber@suse.de,
peppe.cavallaro@st.com, bert@a20.net,
linux-sunxi@googlegroups.com, maxime.ripard@free-electrons.com,
"Gabriel Fernandez" <gabriel.fernandez@linaro.org>,
"Frank Schäfer" <fschaefer.oss@googlemail.com>,
"Dinh Nguyen" <dinh.linux@gmail.com>,
"David S . Miller" <davem@davemloft.net>
Subject: [PATCH 1/2 (linux-stable-4.5.y)] Revert "stmmac: Fix 'eth0: No PHY found' regression"
Date: Mon, 23 May 2016 15:17:42 +0200 [thread overview]
Message-ID: <1464009463-23654-2-git-send-email-peppe.cavallaro@st.com> (raw)
In-Reply-To: <1464009463-23654-1-git-send-email-peppe.cavallaro@st.com>
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
This reverts commit 88f8b1bb41c6208f81b6a480244533ded7b59493.
due to problems on GeekBox and Banana Pi M1 board when
connected to a real transceiver instead of a switch via
fixed-link.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Cc: Andreas Färber <afaerber@suse.de>
Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 11 ++++++++++-
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 +--------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index efb54f3..0faf163 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -199,12 +199,21 @@ int stmmac_mdio_register(struct net_device *ndev)
struct stmmac_priv *priv = netdev_priv(ndev);
struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
int addr, found;
- struct device_node *mdio_node = priv->plat->mdio_node;
+ struct device_node *mdio_node = NULL;
+ struct device_node *child_node = NULL;
if (!mdio_bus_data)
return 0;
if (IS_ENABLED(CONFIG_OF)) {
+ for_each_child_of_node(priv->device->of_node, child_node) {
+ if (of_device_is_compatible(child_node,
+ "snps,dwmac-mdio")) {
+ mdio_node = child_node;
+ break;
+ }
+ }
+
if (mdio_node) {
netdev_dbg(ndev, "FOUND MDIO subnode\n");
} else {
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 4514ba7..6a52fa1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -110,7 +110,6 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
struct device_node *np = pdev->dev.of_node;
struct plat_stmmacenet_data *plat;
struct stmmac_dma_cfg *dma_cfg;
- struct device_node *child_node = NULL;
plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
if (!plat)
@@ -141,19 +140,13 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
plat->phy_node = of_node_get(np);
}
- for_each_child_of_node(np, child_node)
- if (of_device_is_compatible(child_node, "snps,dwmac-mdio")) {
- plat->mdio_node = child_node;
- break;
- }
-
/* "snps,phy-addr" is not a standard property. Mark it as deprecated
* and warn of its use. Remove this when phy node support is added.
*/
if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
- if ((plat->phy_node && !of_phy_is_fixed_link(np)) || !plat->mdio_node)
+ if ((plat->phy_node && !of_phy_is_fixed_link(np)) || plat->phy_bus_name)
plat->mdio_bus_data = NULL;
else
plat->mdio_bus_data =
--
2.7.4
next prev parent reply other threads:[~2016-05-23 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 13:17 [PATCH 0/2 (linux-stable-4.5.y)] net: stmmac: MDIO fixes Giuseppe Cavallaro
2016-05-23 13:17 ` Giuseppe Cavallaro [this message]
2016-08-14 15:44 ` [PATCH 1/2 (linux-stable-4.5.y)] Revert "stmmac: Fix 'eth0: No PHY found' regression" Greg KH
2016-05-23 13:17 ` [PATCH 2/2 (linux-stable-4.5.y)] stmmac: fix MDIO settings Giuseppe Cavallaro
2016-08-14 15:44 ` Greg KH
2016-05-23 15:36 ` [PATCH 0/2 (linux-stable-4.5.y)] net: stmmac: MDIO fixes Greg KH
2016-05-24 7:08 ` Giuseppe CAVALLARO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464009463-23654-2-git-send-email-peppe.cavallaro@st.com \
--to=peppe.cavallaro@st.com \
--cc=afaerber@suse.de \
--cc=bert@a20.net \
--cc=davem@davemloft.net \
--cc=dinh.linux@gmail.com \
--cc=fschaefer.oss@googlemail.com \
--cc=gabriel.fernandez@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=marc.zyngier@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=netdev@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox