]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: fw_devlink: Don't purge child fwnode's consumer links
authorSaravana Kannan <saravanak@google.com>
Tue, 7 Feb 2023 01:41:53 +0000 (17:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:37 +0000 (09:33 +0100)
commit2537a39de4354f5138560d82f51d0c3edaf3512b
treed8b466251784bf502430ccbb4142e53019cad608
parentccb5b224257c5f4106c62668332b13367c25e877
driver core: fw_devlink: Don't purge child fwnode's consumer links

[ Upstream commit b479ab9d417c18c2da52e9de7b9157cbc52b2dff ]

When a device X is bound successfully to a driver, if it has a child
firmware node Y that doesn't have a struct device created by then, we
delete fwnode links where the child firmware node Y is the supplier. We
did this to avoid blocking the consumers of the child firmware node Y
from deferring probe indefinitely.

While that a step in the right direction, it's better to make the
consumers of the child firmware node Y to be consumers of the device X
because device X is probably implementing whatever functionality is
represented by child firmware node Y. By doing this, we capture the
device dependencies more accurately and ensure better
probe/suspend/resume ordering.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcom/sm7225-fairphone-fp4
Link: https://lore.kernel.org/r/20230207014207.1678715-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 943adb0b55d2 ("driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/core.c