Skip to content

Commit 18e0821

Browse files
authored
coresight: platform: check the availability of the endpoint before parse (#373)
Check endpoint availability before parsing it. If parsing a connected endpoint fails, the probe is deferred until the endpoint becomes available, or eventually fails. In some legacy cases, a replicator has two output ports where one is disabled and the other is available. The replicator probe always fails because the disabled endpoint never becomes available for parsing. In addition, there is no need to defer probing a device that is connected to a disabled device, which improves probe performance. Link: https://lore.kernel.org/all/20260320-add-availability-check-v1-1-b2e39cdeb6e0@oss.qualcomm.com/
2 parents 5c2fafc + 2720a81 commit 18e0821

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hwtracing/coresight/coresight-platform.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ static int of_coresight_parse_endpoint(struct device *dev,
220220
rparent = of_coresight_get_port_parent(rep);
221221
if (!rparent)
222222
break;
223+
if (!of_device_is_available(rparent))
224+
break;
223225
if (of_graph_parse_endpoint(rep, &rendpoint))
224226
break;
225227

0 commit comments

Comments
 (0)