]> www.infradead.org Git - nvme.git/commitdiff
firewire: core: record card index in async_phy_inbound tracepoints event
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 13 Jun 2024 13:14:38 +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-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-transaction.c
include/trace/events/firewire.h

index bd5a467cfd6032e27eb57a01f6e31660622e77a7..76ab6a2097685ece08956558936705bb4dedcb8e 100644 (file)
@@ -997,7 +997,7 @@ void fw_core_handle_request(struct fw_card *card, struct fw_packet *p)
 
        tcode = async_header_get_tcode(p->header);
        if (tcode_is_link_internal(tcode)) {
-               trace_async_phy_inbound((uintptr_t)p, p->generation, p->ack, p->timestamp,
+               trace_async_phy_inbound((uintptr_t)p, card->index, p->generation, p->ack, p->timestamp,
                                         p->header[1], p->header[2]);
                fw_cdev_handle_phy_packet(card, p);
                return;
index 61c7a2461fbc6cc28133d8ae87d467ef838efa0f..e5524fc71880167773e5d8d9995641b94ae19d58 100644 (file)
@@ -271,10 +271,11 @@ TRACE_EVENT(async_phy_outbound_complete,
 );
 
 TRACE_EVENT(async_phy_inbound,
-       TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsigned int timestamp, u32 first_quadlet, u32 second_quadlet),
-       TP_ARGS(packet, generation, status, timestamp, first_quadlet, second_quadlet),
+       TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp, u32 first_quadlet, u32 second_quadlet),
+       TP_ARGS(packet, card_index, generation, status, timestamp, first_quadlet, second_quadlet),
        TP_STRUCT__entry(
                __field(u64, packet)
+               __field(u8, card_index)
                __field(u8, generation)
                __field(u8, status)
                __field(u16, timestamp)
@@ -290,8 +291,9 @@ TRACE_EVENT(async_phy_inbound,
                __entry->second_quadlet = second_quadlet
        ),
        TP_printk(
-               "packet=0x%llx generation=%u status=%u timestamp=0x%04x first_quadlet=0x%08x second_quadlet=0x%08x",
+               "packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x first_quadlet=0x%08x second_quadlet=0x%08x",
                __entry->packet,
+               __entry->card_index,
                __entry->generation,
                __entry->status,
                __entry->timestamp,