mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
firewire: core: record card index in tracepoints event for self ID sequence
This patch is for for-next branch. The selfIDComplete event occurs in the bus managed by one of 1394 OHCI controller in Linux system, while 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/20240614004251.460649-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
parent
67e51784c1
commit
2fd22faf0e
@ -140,7 +140,7 @@ 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);
|
||||
trace_self_id_sequence(card->index, 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,
|
||||
|
@ -395,14 +395,16 @@ void copy_port_status(u8 *port_status, unsigned int port_capacity, const u32 *se
|
||||
unsigned int quadlet_count);
|
||||
|
||||
TRACE_EVENT(self_id_sequence,
|
||||
TP_PROTO(const u32 *self_id_sequence, unsigned int quadlet_count, unsigned int generation),
|
||||
TP_ARGS(self_id_sequence, quadlet_count, generation),
|
||||
TP_PROTO(unsigned int card_index, const u32 *self_id_sequence, unsigned int quadlet_count, unsigned int generation),
|
||||
TP_ARGS(card_index, self_id_sequence, quadlet_count, generation),
|
||||
TP_STRUCT__entry(
|
||||
__field(u8, card_index)
|
||||
__field(u8, generation)
|
||||
__dynamic_array(u8, port_status, self_id_sequence_get_port_capacity(quadlet_count))
|
||||
__dynamic_array(u32, self_id_sequence, quadlet_count)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->card_index = card_index;
|
||||
__entry->generation = generation;
|
||||
copy_port_status(__get_dynamic_array(port_status), __get_dynamic_array_len(port_status),
|
||||
self_id_sequence, quadlet_count);
|
||||
@ -410,7 +412,8 @@ TRACE_EVENT(self_id_sequence,
|
||||
__get_dynamic_array_len(self_id_sequence));
|
||||
),
|
||||
TP_printk(
|
||||
"generation=%u phy_id=0x%02x link_active=%s gap_count=%u scode=%u contender=%s power_class=%u initiated_reset=%s port_status=%s self_id_sequence=%s",
|
||||
"card_index=%u generation=%u phy_id=0x%02x link_active=%s gap_count=%u scode=%u contender=%s power_class=%u initiated_reset=%s port_status=%s self_id_sequence=%s",
|
||||
__entry->card_index,
|
||||
__entry->generation,
|
||||
PHY_PACKET_SELF_ID_GET_PHY_ID(__get_dynamic_array(self_id_sequence)),
|
||||
PHY_PACKET_SELF_ID_GET_LINK_ACTIVE(__get_dynamic_array(self_id_sequence)) ? "true" : "false",
|
||||
|
Loading…
Reference in New Issue
Block a user