summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2020-11-21 03:02:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-09 19:10:20 +0100
commitc95d64012ad7de2747923b0caf80e195e940606c (patch)
tree7ea6749daeb4a84aa13e1e134c98f9b5fd3ee395 /drivers/base
parentdriver: core: Fix list corruption after device_del() (diff)
downloadlinux-c95d64012ad7de2747923b0caf80e195e940606c.tar.xz
linux-c95d64012ad7de2747923b0caf80e195e940606c.zip
Revert "driver core: Avoid deferred probe due to fw_devlink_pause/resume()"
This reverts commit 2451e746478a6a6e981cfa66b62b791ca93b90c8. fw_devlink_pause/resume() was an incomplete attempt at boot time optimization. That's going to get replaced by a much better optimization at the end of the series. Since fw_devlink_pause/resume() is going away, changes made for that can also go away. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201121020232.908850-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index ba5a3cac6571..58c7d17820a7 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -51,7 +51,6 @@ static DEFINE_MUTEX(wfs_lock);
static LIST_HEAD(deferred_sync);
static unsigned int defer_sync_state_count = 1;
static unsigned int defer_fw_devlink_count;
-static LIST_HEAD(deferred_fw_devlink);
static DEFINE_MUTEX(defer_fw_devlink_lock);
static bool fw_devlink_is_permissive(void);
@@ -1468,12 +1467,6 @@ static void fw_devlink_link_device(struct device *dev)
fw_ret = -EAGAIN;
} else {
fw_ret = -ENODEV;
- /*
- * defer_hook is not used to add device to deferred_sync list
- * until device is bound. Since deferred fw devlink also blocks
- * probing, same list hook can be used for deferred_fw_devlink.
- */
- list_add_tail(&dev->links.defer_hook, &deferred_fw_devlink);
}
if (fw_ret == -ENODEV)
@@ -1542,9 +1535,6 @@ void fw_devlink_pause(void)
*/
void fw_devlink_resume(void)
{
- struct device *dev, *tmp;
- LIST_HEAD(probe_list);
-
mutex_lock(&defer_fw_devlink_lock);
if (!defer_fw_devlink_count) {
WARN(true, "Unmatched fw_devlink pause/resume!");
@@ -1556,19 +1546,8 @@ void fw_devlink_resume(void)
goto out;
device_link_add_missing_supplier_links();
- list_splice_tail_init(&deferred_fw_devlink, &probe_list);
out:
mutex_unlock(&defer_fw_devlink_lock);
-
- /*
- * bus_probe_device() can cause new devices to get added and they'll
- * try to grab defer_fw_devlink_lock. So, this needs to be done outside
- * the defer_fw_devlink_lock.
- */
- list_for_each_entry_safe(dev, tmp, &probe_list, links.defer_hook) {
- list_del_init(&dev->links.defer_hook);
- bus_probe_device(dev);
- }
}
/* Device links support end. */