* [PATCH] driver core: fw_devlink: Don't report refused sync_state-only links as errors
@ 2026-11-10 7:11 Arun Iyengar via B4 Relay
0 siblings, 0 replies; only message in thread
From: Arun Iyengar via B4 Relay @ 2026-11-10 7:11 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
Johan Hovold, Heiko Stuebner
Cc: driver-core, linux-kernel, linux-arm-kernel, linux-rockchip
From: Arun Iyengar <aiyengar1990@gmail.com>
A SYNC_STATE_ONLY device link is refused by device_link_add() once the
consumer has already probed, since such a link only orders sync_state()
callbacks and would be useless. This legitimately happens when a consumer
that probes early (for example the Rockchip power domain provider, whose
domains reference a PMIC regulator through domain-supply) is inferred to
depend on a supplier device that is added later, and results in boot-time
"Failed to create device link (0x180)" errors for a harmless condition.
Log the refusal of a sync_state-only link at debug level and keep the error
for links that matter for probe ordering.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Tested on an Orange Pi 5 (RK3588S): the three "Failed to create device
link (0x180)" lines that the Rockchip power controller logged on every
boot (suppliers: the RK806 PMIC on SPI and an RK8602 on I2C, referenced
through domain-supply of two of its power domains) are gone, and the
regulators are still acquired and held by those domains.
This patch was developed with Claude (Anthropic) as a coding assistant:
it wrote the code and the commit message, and I reviewed and tested it
as described above.
---
drivers/base/core.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index bf97b06337a1..4cdfc156ffbc 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2241,8 +2241,20 @@ static int fw_devlink_create_devlink(struct device *con,
}
if (con != sup_dev && !device_link_add(con, sup_dev, flags)) {
- dev_err(con, "Failed to create device link (0x%x) with supplier %s for %pfwf\n",
- flags, dev_name(sup_dev), link->consumer);
+ /*
+ * A SYNC_STATE_ONLY link only orders sync_state() and
+ * is refused once the consumer has probed. That is
+ * expected when a consumer that probes early (e.g. a
+ * power domain provider referencing a regulator
+ * supplier that is added later) is linked to a late
+ * supplier, so don't report it as an error.
+ */
+ if (device_link_flag_is_sync_state_only(flags))
+ dev_dbg(con, "Not creating sync_state-only device link (0x%x) with supplier %s for %pfwf\n",
+ flags, dev_name(sup_dev), link->consumer);
+ else
+ dev_err(con, "Failed to create device link (0x%x) with supplier %s for %pfwf\n",
+ flags, dev_name(sup_dev), link->consumer);
ret = -EINVAL;
}
---
base-commit: ec1db86e7bb3ec13c90456efac43659a723ac068
change-id: 20261110-fw-devlink-sync-state-f71babbf968b
Best regards,
--
Arun Iyengar <aiyengar1990@gmail.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-10 7:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 7:11 [PATCH] driver core: fw_devlink: Don't report refused sync_state-only links as errors Arun Iyengar via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®