diff options
author | Zhang Ying-22455 <ying.zhang22455@nxp.com> | 2017-09-01 06:11:25 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:47 (GMT) |
commit | 49959577f83bdc48fc8c9f306dc6f5a3887689b7 (patch) | |
tree | 5d5e9c89d4dc6e507660775410a0881b702700fe | |
parent | 58112db33e4ec37f1b47727d4dd80f97dbadd8cc (diff) | |
download | linux-49959577f83bdc48fc8c9f306dc6f5a3887689b7.tar.xz |
dpaa_eth: memac: set adjust_link callback for fixed link interfaces
Signed-off-by: Camelia Groza camelia.groza@nxp.com
-rw-r--r-- | drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c index 1d127d6..2c5652d 100644 --- a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c @@ -503,11 +503,9 @@ static int memac_init_phy(struct net_device *net_dev, { struct phy_device *phy_dev; - if (of_phy_is_fixed_link(mac_dev->phy_node)) { - phy_dev = of_phy_attach(net_dev, mac_dev->phy_node, - 0, mac_dev->phy_if); - } else if ((macdev2enetinterface(mac_dev) == e_ENET_MODE_XGMII_10000) || - (macdev2enetinterface(mac_dev) == e_ENET_MODE_SGMII_2500)) { + if ((macdev2enetinterface(mac_dev) == e_ENET_MODE_XGMII_10000) || + (macdev2enetinterface(mac_dev) == e_ENET_MODE_SGMII_2500) || + of_phy_is_fixed_link(mac_dev->phy_node)) { phy_dev = of_phy_connect(net_dev, mac_dev->phy_node, &adjust_link_void, 0, mac_dev->phy_if); |