aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2014-08-07 17:48:26 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-07 19:02:59 -0400
commita1f7d81b735cdd682b0e7c81bb2c6821cbbf8060 (patch)
treed6594d6a2a6af1f049189165cc391c149ac5f854
parentf1f02fa4f15bc682814c71fe05c6b76e5f5fba80 (diff)
net: ucc_geth: Don't use the MAC as PHY without a fixed link
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/freescale/ucc_geth.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 0c83ef078ddf..d6b64e316527 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3785,15 +3785,14 @@ static int ucc_geth_probe(struct platform_device* ofdev)
3785 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); 3785 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
3786 3786
3787 ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0); 3787 ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0);
3788 if (!ug_info->phy_node) { 3788 if (!ug_info->phy_node && of_phy_is_fixed_link(np)) {
3789 /* In the case of a fixed PHY, the DT node associated 3789 /*
3790 * In the case of a fixed PHY, the DT node associated
3790 * to the PHY is the Ethernet MAC DT node. 3791 * to the PHY is the Ethernet MAC DT node.
3791 */ 3792 */
3792 if (of_phy_is_fixed_link(np)) { 3793 err = of_phy_register_fixed_link(np);
3793 err = of_phy_register_fixed_link(np); 3794 if (err)
3794 if (err) 3795 return err;
3795 return err;
3796 }
3797 ug_info->phy_node = of_node_get(np); 3796 ug_info->phy_node = of_node_get(np);
3798 } 3797 }
3799 3798