ath79: ag71xx: defer probe if of_phy_connect failed
gmac0 may need a phy on builtin switch, which can be unavailable if gmac0 is probed before builtin switch. Return -EPROBE_DEFER in this case so that gmac0 can be probed later. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This commit is contained in:
committed by
Petr Štetiar
parent
f84715d463
commit
32817580e7
@@ -75,8 +75,8 @@ int ag71xx_phy_connect(struct ag71xx *ag)
|
|||||||
|
|
||||||
if (!ag->phy_dev) {
|
if (!ag->phy_dev) {
|
||||||
dev_err(&ag->pdev->dev,
|
dev_err(&ag->pdev->dev,
|
||||||
"Could not connect to PHY device\n");
|
"Could not connect to PHY device. Deferring probe.\n");
|
||||||
return -ENODEV;
|
return -EPROBE_DEFER;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_info(&ag->pdev->dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",
|
dev_info(&ag->pdev->dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user