[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456677700-23027-28-git-send-email-andrew@lunn.ch>
Date: Sun, 28 Feb 2016 17:41:35 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
netdev <netdev@...r.kernel.org>
Cc: Andrew Lunn <andrew@...n.ch>
Subject: [PATCH RFC v2 27/32] net: dsa: If a switch fails to probe, defer probing
Switches are either listed in device tree or platform_data. They
should exist. If the probe fails, defer the probe, which is the likely
cause of failure, not broken device tree or platform data.
Signed-off-by: Andrew Lunn <andrew@...n.ch>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
---
net/dsa/dsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index f3ffc937b152..c61b7ab092f5 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -435,7 +435,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
if (drv == NULL) {
netdev_err(dst->master_netdev, "[%d]: could not detect attached switch\n",
index);
- return ERR_PTR(-EINVAL);
+ return ERR_PTR(-EPROBE_DEFER);
}
netdev_info(dst->master_netdev, "[%d]: detected a %s switch\n",
index, name);
--
2.7.0
Powered by blists - more mailing lists