Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 893098b

Browse files
committed
firewire: core: record card index in bus_reset_handle tracepoints event
The bus reset event occurs in the bus managed by one of 1394 OHCI controller in Linux system, however the existing tracepoints events has the lack of data about it to distinguish the issued hardware from the others. This commit adds card_index member into event structure to store the index of host controller in use, and prints it. Link: https://lore.kernel.org/r/20240613131440.431766-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent 7507dbc commit 893098b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/firewire/core-topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
508508
struct fw_node *local_node;
509509
unsigned long flags;
510510

511-
trace_bus_reset_handle(generation, node_id, bm_abdicate, self_ids, self_id_count);
511+
trace_bus_reset_handle(card->index, generation, node_id, bm_abdicate, self_ids, self_id_count);
512512

513513
spin_lock_irqsave(&card->lock, flags);
514514

include/trace/events/firewire.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,22 +339,25 @@ DEFINE_EVENT(bus_reset_arrange_template, bus_reset_postpone,
339339
);
340340

341341
TRACE_EVENT(bus_reset_handle,
342-
TP_PROTO(unsigned int generation, unsigned int node_id, bool bm_abdicate, u32 *self_ids, unsigned int self_id_count),
343-
TP_ARGS(generation, node_id, bm_abdicate, self_ids, self_id_count),
342+
TP_PROTO(unsigned int card_index, unsigned int generation, unsigned int node_id, bool bm_abdicate, u32 *self_ids, unsigned int self_id_count),
343+
TP_ARGS(card_index, generation, node_id, bm_abdicate, self_ids, self_id_count),
344344
TP_STRUCT__entry(
345+
__field(u8, card_index)
345346
__field(u8, generation)
346347
__field(u8, node_id)
347348
__field(bool, bm_abdicate)
348349
__dynamic_array(u32, self_ids, self_id_count)
349350
),
350351
TP_fast_assign(
352+
__entry->card_index = card_index;
351353
__entry->generation = generation;
352354
__entry->node_id = node_id;
353355
__entry->bm_abdicate = bm_abdicate;
354356
memcpy(__get_dynamic_array(self_ids), self_ids, __get_dynamic_array_len(self_ids));
355357
),
356358
TP_printk(
357-
"generation=%u node_id=0x%04x bm_abdicate=%s self_ids=%s",
359+
"card_index=%u generation=%u node_id=0x%04x bm_abdicate=%s self_ids=%s",
360+
__entry->card_index,
358361
__entry->generation,
359362
__entry->node_id,
360363
__entry->bm_abdicate ? "true" : "false",

0 commit comments

Comments
 (0)