diff options
author | Saravana Kannan <saravanak@google.com> | 2021-04-02 06:03:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-05 09:17:56 +0200 |
commit | d46f3e3ed5276e756caf40f760d4902d15c12dcb (patch) | |
tree | 26e8d3ab879b9f511a248c47c11d2492ccf719ac /drivers/base/base.h | |
parent | Merge 5.12-rc6 into driver-core-next (diff) | |
download | linux-d46f3e3ed5276e756caf40f760d4902d15c12dcb.tar.xz linux-d46f3e3ed5276e756caf40f760d4902d15c12dcb.zip |
driver core: Improve fw_devlink & deferred_probe_timeout interaction
deferred_probe_timeout kernel commandline parameter allows probing of
consumer devices if the supplier devices don't have any drivers.
fw_devlink=on will indefintely block probe() calls on a device if all
its suppliers haven't probed successfully. This completely skips calls
to driver_deferred_probe_check_state() since that's only called when a
.probe() function calls framework APIs. So fw_devlink=on breaks
deferred_probe_timeout.
deferred_probe_timeout in its current state also ignores a lot of
information that's now available to the kernel. It assumes all suppliers
that haven't probed when the timer expires (or when initcalls are done
on a static kernel) will never probe and fails any calls to acquire
resources from these unprobed suppliers.
However, this assumption by deferred_probe_timeout isn't true under many
conditions. For example:
- If the consumer happens to be before the supplier in the deferred
probe list.
- If the supplier itself is waiting on its supplier to probe.
This patch fixes both these issues by relaxing device links between
devices only if the supplier doesn't have any driver that could match
with (NOT bound to) the supplier device. This way, we only fail attempts
to acquire resources from suppliers that truly don't have any driver vs
suppliers that just happen to not have probed yet.
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210402040342.2944858-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r-- | drivers/base/base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index 1b44ed588f66..e5f9b7e656c3 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -191,6 +191,7 @@ extern void device_links_driver_cleanup(struct device *dev); extern void device_links_no_driver(struct device *dev); extern bool device_links_busy(struct device *dev); extern void device_links_unbind_consumers(struct device *dev); +extern void fw_devlink_drivers_done(void); /* device pm support */ void device_pm_move_to_tail(struct device *dev); |