firewire: core: record card index in async_phy_outbound_complete tracepoints event
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 13 Jun 2024 13:14:37 +0000 (22:14 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 15 Jun 2024 05:59:17 +0000 (14:59 +0900)
The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing tracepoints events has the lack of
data about it.

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-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-cdev.c
drivers/firewire/core-transaction.c
include/trace/events/firewire.h

index ff8739f96af5bde10444dd8dc2b71da8b8e5aba4..9a7dc90330a3514f29c9b053d581a9e38984bf62 100644 (file)
@@ -1559,7 +1559,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
        struct client *e_client = e->client;
        u32 rcode;
 
-       trace_async_phy_outbound_complete((uintptr_t)packet, status, packet->generation,
+       trace_async_phy_outbound_complete((uintptr_t)packet, card->index, status, packet->generation,
                                          packet->timestamp);
 
        switch (status) {
index e522dc3d98970079399c2e84039f3cd481f09cc6..bd5a467cfd6032e27eb57a01f6e31660622e77a7 100644 (file)
@@ -464,7 +464,7 @@ static DECLARE_COMPLETION(phy_config_done);
 static void transmit_phy_packet_callback(struct fw_packet *packet,
                                         struct fw_card *card, int status)
 {
-       trace_async_phy_outbound_complete((uintptr_t)packet, packet->generation, status,
+       trace_async_phy_outbound_complete((uintptr_t)packet, card->index, packet->generation, status,
                                          packet->timestamp);
        complete(&phy_config_done);
 }
index a59dc26b2a536a8ff72904e0d10f11846715940e..61c7a2461fbc6cc28133d8ae87d467ef838efa0f 100644 (file)
@@ -244,23 +244,26 @@ TRACE_EVENT(async_phy_outbound_initiate,
 );
 
 TRACE_EVENT(async_phy_outbound_complete,
-       TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsigned int timestamp),
-       TP_ARGS(packet, generation, status, timestamp),
+       TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp),
+       TP_ARGS(packet, card_index, generation, status, timestamp),
        TP_STRUCT__entry(
                __field(u64, packet)
+               __field(u8, card_index)
                __field(u8, generation)
                __field(u8, status)
                __field(u16, timestamp)
        ),
        TP_fast_assign(
                __entry->packet = packet;
+               __entry->card_index = card_index;
                __entry->generation = generation;
                __entry->status = status;
                __entry->timestamp = timestamp;
        ),
        TP_printk(
-               "packet=0x%llx generation=%u status=%u timestamp=0x%04x",
+               "packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x",
                __entry->packet,
+               __entry->card_index,
                __entry->generation,
                __entry->status,
                __entry->timestamp