[PATCH] driver core: Emit reason for pending deferred probe

Uwe Kleine-König posted 1 patch 2 years ago
drivers/base/dd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] driver core: Emit reason for pending deferred probe
Posted by Uwe Kleine-König 2 years ago
Ending a boot log with

	platform 3f202000.mmc: deferred probe pending

is already a nice hint about the problem. Sometimes there is a more
detailed error indicator available, add that to the output.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

it's only compile tested, I created that patch while remote debugging an
issue by an irc user who provided the kernel log of a hung boot ending
in such output.

Best regards
Uwe

 drivers/base/dd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 0c3725c3eefa..85152537dbf1 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -313,7 +313,7 @@ static void deferred_probe_timeout_work_func(struct work_struct *work)
 
 	mutex_lock(&deferred_probe_mutex);
 	list_for_each_entry(p, &deferred_probe_pending_list, deferred_probe)
-		dev_info(p->device, "deferred probe pending\n");
+		dev_info(p->device, "deferred probe pending: %s", p->deferred_probe_reason ?: "(reason unknown)\n");
 	mutex_unlock(&deferred_probe_mutex);
 
 	fw_devlink_probing_done();

base-commit: 07b677953b9dca02928be323e2db853511305fa9
-- 
2.42.0