Skip to content

Commit

Permalink
net: ucc_geth: Don't use the MAC as PHY without a fixed link
Browse files Browse the repository at this point in the history
This matches what the other drivers using fixed-link support do and
restores the behaviour before commit 8700981 ("ucc_geth: use the
new fixed PHY helpers") for the affected device trees (i.e. no
phy-handle and no fixed-link).

Fixes: 8700981 ("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>
  • Loading branch information
Uwe Kleine-König authored and David S. Miller committed Aug 7, 2014
1 parent f1f02fa commit a1f7d81
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/net/ethernet/freescale/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3785,15 +3785,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);
}

Expand Down

0 comments on commit a1f7d81

Please sign in to comment.