From: Jason Gunthorpe Date: Tue, 5 Nov 2013 00:27:19 +0000 (-0700) Subject: net: mv643xx_eth: Add missing phy_addr_set in DT mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cce16d37d0fe2668787d64ad172c5be6973aeca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: mv643xx_eth: Add missing phy_addr_set in DT mode Commit cc9d4598 'net: mv643xx_eth: use of_phy_connect if phy_node present' made the call to phy_scan optional, if the DT has a link to the phy node. However phy_scan has the side effect of calling phy_addr_set, which writes the phy MDIO address to the ethernet controller. If phy_addr_set is not called, and the bootloader has not set the correct address then the driver will fail to function. Tested on Kirkwood. Signed-off-by: Jason Gunthorpe Acked-by: Sebastian Hesselbarth Tested-by: Arnaud Ebalard Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 4cfae6c9a63f..00cd36e08601 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -2890,6 +2890,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) PHY_INTERFACE_MODE_GMII); if (!mp->phy) err = -ENODEV; + phy_addr_set(mp, mp->phy->addr); } else if (pd->phy_addr != MV643XX_ETH_PHY_NONE) { mp->phy = phy_scan(mp, pd->phy_addr);