From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Li Yang <leoli@freescale.com>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de
Subject: [PATCH 3/3] net: ucc_geth: Don't use the MAC as PHY without a fixed link
Date: Thu, 7 Aug 2014 23:48:26 +0200 [thread overview]
Message-ID: <1407448106-1819-3-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1407448106-1819-1-git-send-email-u.kleine-koenig@pengutronix.de>
This matches what the other drivers using fixed-link support do and
restores the behaviour before commit 87009814cdbb ("ucc_geth: use the
new fixed PHY helpers") for the affected device trees (i.e. no
phy-handle and no fixed-link).
Fixes: 87009814cdbb ("ucc_geth: use the new fixed PHY helpers")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/freescale/ucc_geth.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index a22ff770f9e5..07415a0df88c 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3787,15 +3787,14 @@ static int ucc_geth_probe(struct platform_device* ofdev)
ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0);
- if (!ug_info->phy_node) {
- /* In the case of a fixed PHY, the DT node associated
+ if (!ug_info->phy_node && of_phy_is_fixed_link(np)) {
+ /*
+ * In the case of a fixed PHY, the DT node associated
* to the PHY is the Ethernet MAC DT node.
*/
- if (of_phy_is_fixed_link(np)) {
- err = of_phy_register_fixed_link(np);
- if (err)
- return err;
- }
+ err = of_phy_register_fixed_link(np);
+ if (err)
+ return err;
ug_info->phy_node = of_node_get(np);
}
--
2.0.1
next prev parent reply other threads:[~2014-08-07 21:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 21:48 [PATCH 1/3] net: ucc_geth: drop acquired references in probe error path and remove Uwe Kleine-König
2014-08-07 21:48 ` [PATCH 2/3] net: ucc_geth: make probe consistently acquire a reference to the phy node Uwe Kleine-König
2014-08-07 23:07 ` David Miller
2014-08-07 21:48 ` Uwe Kleine-König [this message]
2014-08-07 23:07 ` [PATCH 3/3] net: ucc_geth: Don't use the MAC as PHY without a fixed link David Miller
2014-08-07 23:07 ` [PATCH 1/3] net: ucc_geth: drop acquired references in probe error path and remove David Miller
2014-08-08 20:34 ` Uwe Kleine-König
2014-08-08 20:52 ` David Miller
2014-08-10 18:32 ` [PATCH] net: ucc_geth: fix build failure Uwe Kleine-König
2014-08-11 4:40 ` David Miller
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=1407448106-1819-3-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=leoli@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).