--- drivers/base/core.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) Index: linux-pm/drivers/base/core.c =================================================================== --- linux-pm.orig/drivers/base/core.c +++ linux-pm/drivers/base/core.c @@ -260,6 +260,17 @@ struct device_link *device_link_add(stru link->status = DL_STATE_NONE; } else { switch (supplier->links.status) { + case DL_DEV_PROBING: + /* + * A consumer driver can create a link to a supplier + * that also is probing as long as it knows that the + * supplier is already functional (for example, it has + * just acquired some resources from the supplier). + */ + link->status = consumer->links.status == DL_DEV_PROBING ? + DL_STATE_CONSUMER_PROBE : + DL_STATE_DORMANT; + break; case DL_DEV_DRIVER_BOUND: switch (consumer->links.status) { case DL_DEV_PROBING: @@ -474,6 +485,14 @@ void device_links_driver_bound(struct de if (link->flags & DL_FLAG_STATELESS) continue; + /* + * Links created during consumer probe may be in the "consumer + * probe" state to start with if the supplier is still probing + * when they are created. Skip them here. + */ + if (link->status == DL_STATE_CONSUMER_PROBE) + continue; + WARN_ON(link->status != DL_STATE_DORMANT); WRITE_ONCE(link->status, DL_STATE_AVAILABLE); }