diff options
author | Shaohui Xie <Shaohui.Xie@freescale.com> | 2013-05-23 01:25:29 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-05-31 21:27:35 (GMT) |
commit | 2bc711991745c862fdd405df2dcc7f89285f51e7 (patch) | |
tree | 2dd60f231f02401171712d3c1cb30e3ff887488f /drivers/net/ethernet/freescale/dpa/mac-api.c | |
parent | 229dc6b7173c4c8bbd586e32cbcf871f0bb27d60 (diff) | |
download | linux-fsl-qoriq-2bc711991745c862fdd405df2dcc7f89285f51e7.tar.xz |
powerpc/dpaa: workaround of fixed-link
fixed-link does not work in 3.8.x, to make XFI work which has no PHY,
it's actually not necessary to use fixed-link, otherwise there will be
more work and code changes to make fixed-link work in 3.8.x. For now, if
driver does not find the phy_node of MAC, just set the mac_dev->phy_dev
= NULL and return 0; we can get XFI work and this won't break other
ethernet ports. It's only for SDK1.4, if we decide to bring fixed-link
back, it can be done after SDK1.4.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Change-Id: I930edbe76f5d739f7d6565d3a7f8a3aabf224db0
Reviewed-on: http://git.am.freescale.net:8181/2797
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zang Tiefei-R61911 <tie-fei.zang@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/mac-api.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/mac-api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/mac-api.c b/drivers/net/ethernet/freescale/dpa/mac-api.c index b43687f..501b082 100644 --- a/drivers/net/ethernet/freescale/dpa/mac-api.c +++ b/drivers/net/ethernet/freescale/dpa/mac-api.c @@ -529,10 +529,10 @@ static int memac_init_phy(struct net_device *net_dev) mac_dev = priv->mac_dev; if (macdev2enetinterface(mac_dev) == e_ENET_MODE_XGMII_10000) { - if (!mac_dev->phy_node) - phy_dev = phy_attach(net_dev, mac_dev->fixed_bus_id, 0, - mac_dev->phy_if); - else + if (!mac_dev->phy_node) { + mac_dev->phy_dev = NULL; + return 0; + } else phy_dev = of_phy_attach(net_dev, mac_dev->phy_node, 0, mac_dev->phy_if); } else { |