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

Commit abbb4bd

Browse files
committed
firewire: core: record card index in async_phy_inbound tracepoints event
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>
1 parent 810f2aa commit abbb4bd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

drivers/firewire/core-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ void fw_core_handle_request(struct fw_card *card, struct fw_packet *p)
997997

998998
tcode = async_header_get_tcode(p->header);
999999
if (tcode_is_link_internal(tcode)) {
1000-
trace_async_phy_inbound((uintptr_t)p, p->generation, p->ack, p->timestamp,
1000+
trace_async_phy_inbound((uintptr_t)p, card->index, p->generation, p->ack, p->timestamp,
10011001
p->header[1], p->header[2]);
10021002
fw_cdev_handle_phy_packet(card, p);
10031003
return;

include/trace/events/firewire.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,11 @@ TRACE_EVENT(async_phy_outbound_complete,
271271
);
272272

273273
TRACE_EVENT(async_phy_inbound,
274-
TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsigned int timestamp, u32 first_quadlet, u32 second_quadlet),
275-
TP_ARGS(packet, generation, status, timestamp, first_quadlet, second_quadlet),
274+
TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp, u32 first_quadlet, u32 second_quadlet),
275+
TP_ARGS(packet, card_index, generation, status, timestamp, first_quadlet, second_quadlet),
276276
TP_STRUCT__entry(
277277
__field(u64, packet)
278+
__field(u8, card_index)
278279
__field(u8, generation)
279280
__field(u8, status)
280281
__field(u16, timestamp)
@@ -290,8 +291,9 @@ TRACE_EVENT(async_phy_inbound,
290291
__entry->second_quadlet = second_quadlet
291292
),
292293
TP_printk(
293-
"packet=0x%llx generation=%u status=%u timestamp=0x%04x first_quadlet=0x%08x second_quadlet=0x%08x",
294+
"packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x first_quadlet=0x%08x second_quadlet=0x%08x",
294295
__entry->packet,
296+
__entry->card_index,
295297
__entry->generation,
296298
__entry->status,
297299
__entry->timestamp,

0 commit comments

Comments
 (0)