aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-06-14 09:42:51 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-06-17 08:37:04 +0900
commit2fd22faf0e9f120c39e6f47e5622b0039bb10817 (patch)
tree27b34544792393f1327cbeb66134a4b0922c5074 /include
parentfirewire: core: use inline helper functions to serialize phy config packet (diff)
downloadlinux-2fd22faf0e9f120c39e6f47e5622b0039bb10817.tar.gz
linux-2fd22faf0e9f120c39e6f47e5622b0039bb10817.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/firewire.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/trace/events/firewire.h b/include/trace/events/firewire.h
index 1d0d63b0f8e7..d237a30d197b 100644
--- a/include/trace/events/firewire.h
+++ b/include/trace/events/firewire.h
@@ -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",