summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-topology.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-06-06 01:51:55 +0200
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-06-17 01:37:03 +0200
commit677ceae190732ee844f940d1e4860af4022d2be3 (patch)
tree1a9af11d8cf3712f3e4b6f24f2011e6e7893b13b /drivers/firewire/core-topology.c
parentfirewire: core: arrangement header inclusion for tracepoints events (diff)
downloadlinux-677ceae190732ee844f940d1e4860af4022d2be3.tar.xz
linux-677ceae190732ee844f940d1e4860af4022d2be3.zip
firewire: core: add tracepoints event for self_id_sequence
It is helpful to trace the content of self ID sequence when the core function building bus topology. This commit adds a tracepoints event fot the purpose. It seems not to achieve printing variable length of array in print time without any storage, thus the structure of event includes a superfluous array to store the state of port. Additionally, there is no helper function to print symbol array, thus the state of port is printed as raw value. Link: https://lore.kernel.org/r/20240605235155.116468-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core-topology.c')
-rw-r--r--drivers/firewire/core-topology.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index e17a01345857..04e24d14e031 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -95,7 +95,8 @@ static inline struct fw_node *fw_node(struct list_head *l)
* internally consistent. On success this function returns the
* fw_node corresponding to the local card otherwise NULL.
*/
-static struct fw_node *build_tree(struct fw_card *card, const u32 *sid, int self_id_count)
+static struct fw_node *build_tree(struct fw_card *card, const u32 *sid, int self_id_count,
+ unsigned int generation)
{
struct self_id_sequence_enumerator enumerator = {
.cursor = sid,
@@ -139,6 +140,8 @@ static struct fw_node *build_tree(struct fw_card *card, const u32 *sid, int self
}
port_capacity = self_id_sequence_get_port_capacity(quadlet_count);
+ trace_self_id_sequence(self_id_sequence, quadlet_count, generation);
+
for (port_index = 0; port_index < port_capacity; ++port_index) {
port_status = self_id_sequence_get_port_status(self_id_sequence, quadlet_count,
port_index);
@@ -482,7 +485,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
card->bm_abdicate = bm_abdicate;
fw_schedule_bm_work(card, 0);
- local_node = build_tree(card, self_ids, self_id_count);
+ local_node = build_tree(card, self_ids, self_id_count, generation);
update_topology_map(card, self_ids, self_id_count);