Commit 1f0dfa05 authored by Saravana Kannan's avatar Saravana Kannan Committed by Greg Kroah-Hartman
Browse files

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: default avatarSaravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20201218031703.3053753-2-saravanak@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7520962b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;
		}