aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-05-10 22:17:28 +0800
committerPetr Štetiar <ynezz@true.cz>2019-06-05 10:12:31 +0200
commit32817580e79bb129e5ea78285109c6119ff40fd0 (patch)
treeba7b6c8161bed14faae3b871f1cf5c1b11bd2e47 /target/linux/ath79/files
parentf84715d463e63bd8c6fa873a9183b418ff24eeb5 (diff)
downloadupstream-32817580e79bb129e5ea78285109c6119ff40fd0.tar.gz
upstream-32817580e79bb129e5ea78285109c6119ff40fd0.tar.bz2
upstream-32817580e79bb129e5ea78285109c6119ff40fd0.zip
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>
Diffstat (limited to 'target/linux/ath79/files')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
index f9df38d530..ac1af26860 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
@@ -75,8 +75,8 @@ int ag71xx_phy_connect(struct ag71xx *ag)
if (!ag->phy_dev) {
dev_err(&ag->pdev->dev,
- "Could not connect to PHY device\n");
- return -ENODEV;
+ "Could not connect to PHY device. Deferring probe.\n");
+ return -EPROBE_DEFER;
}
dev_info(&ag->pdev->dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",