driver core: Add debug logs for device link related probe deferrals
There's insufficient logging when device links or fw_devlink (waiting to create device links) cause probe deferrals. This makes it hard to debug devices not getting probed. So, add debug logs to make it easy to debug. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201218031703.3053753-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
7520962b66
Коммит
1f0dfa0545
|
@ -929,6 +929,10 @@ int device_links_check_suppliers(struct device *dev)
|
|||
mutex_lock(&fwnode_link_lock);
|
||||
if (dev->fwnode && !list_empty(&dev->fwnode->suppliers) &&
|
||||
!fw_devlink_is_permissive()) {
|
||||
dev_dbg(dev, "probe deferral - wait for supplier %pfwP\n",
|
||||
list_first_entry(&dev->fwnode->suppliers,
|
||||
struct fwnode_link,
|
||||
c_hook)->supplier);
|
||||
mutex_unlock(&fwnode_link_lock);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
@ -943,6 +947,8 @@ int device_links_check_suppliers(struct device *dev)
|
|||
if (link->status != DL_STATE_AVAILABLE &&
|
||||
!(link->flags & DL_FLAG_SYNC_STATE_ONLY)) {
|
||||
device_links_missing_supplier(dev);
|
||||
dev_dbg(dev, "probe deferral - supplier %s not ready\n",
|
||||
dev_name(link->supplier));
|
||||
ret = -EPROBE_DEFER;
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче