LF-3798: dprc-driver.c: resource pools are no longer initialized
authorRobert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Tue, 25 May 2021 09:12:03 +0000 (12:12 +0300)
committerXiaobo Xie <xiaobo.xie@nxp.com>
Wed, 2 Jun 2021 09:54:58 +0000 (11:54 +0200)
dprc_scan_container() function is no longer called on a device
endpoint lookup, which, in turn, called fsl_mc_init_all_resource_pools.
Scanning for objects is done using the dprc_scan_objects()
function directly.

Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
drivers/bus/fsl-mc/fsl-mc-bus.c

index 09bce92..bd4fd9c 100644 (file)
@@ -946,7 +946,12 @@ struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev)
         * Force a rescan of the devices in this container and retry the lookup.
         */
        if (!endpoint) {
-               err = dprc_scan_container(mc_bus_dev, true);
+               struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);
+
+               mutex_lock(&mc_bus->scan_mutex);
+               err = dprc_scan_objects(mc_bus_dev, true);
+               mutex_unlock(&mc_bus->scan_mutex);
+
                if (err < 0)
                        return ERR_PTR(err);
        }