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

Commit 3cb44a7

Browse files
committed
firewire: core: record card index in async_phy_outbound_initiate tracepoints event
The asynchronous transaction 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-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent 65ec7eb commit 3cb44a7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

drivers/firewire/core-cdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,8 +1659,8 @@ static int ioctl_send_phy_packet(struct client *client, union ioctl_arg *arg)
16591659
memcpy(pp->data, a->data, sizeof(a->data));
16601660
}
16611661

1662-
trace_async_phy_outbound_initiate((uintptr_t)&e->p, e->p.generation, e->p.header[1],
1663-
e->p.header[2]);
1662+
trace_async_phy_outbound_initiate((uintptr_t)&e->p, card->index, e->p.generation,
1663+
e->p.header[1], e->p.header[2]);
16641664

16651665
card->driver->send_request(card, &e->p);
16661666

drivers/firewire/core-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ void fw_send_phy_config(struct fw_card *card,
504504
phy_config_packet.generation = generation;
505505
reinit_completion(&phy_config_done);
506506

507-
trace_async_phy_outbound_initiate((uintptr_t)&phy_config_packet,
507+
trace_async_phy_outbound_initiate((uintptr_t)&phy_config_packet, card->index,
508508
phy_config_packet.generation, phy_config_packet.header[1],
509509
phy_config_packet.header[2]);
510510

include/trace/events/firewire.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,23 +217,26 @@ DEFINE_EVENT(async_outbound_complete_template, async_response_outbound_complete,
217217
#undef ASYNC_HEADER_GET_RCODE
218218

219219
TRACE_EVENT(async_phy_outbound_initiate,
220-
TP_PROTO(u64 packet, unsigned int generation, u32 first_quadlet, u32 second_quadlet),
221-
TP_ARGS(packet, generation, first_quadlet, second_quadlet),
220+
TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, u32 first_quadlet, u32 second_quadlet),
221+
TP_ARGS(packet, card_index, generation, first_quadlet, second_quadlet),
222222
TP_STRUCT__entry(
223223
__field(u64, packet)
224+
__field(u8, card_index)
224225
__field(u8, generation)
225226
__field(u32, first_quadlet)
226227
__field(u32, second_quadlet)
227228
),
228229
TP_fast_assign(
229230
__entry->packet = packet;
231+
__entry->card_index = card_index;
230232
__entry->generation = generation;
231233
__entry->first_quadlet = first_quadlet;
232234
__entry->second_quadlet = second_quadlet
233235
),
234236
TP_printk(
235-
"packet=0x%llx generation=%u first_quadlet=0x%08x second_quadlet=0x%08x",
237+
"packet=0x%llx card_index=%u generation=%u first_quadlet=0x%08x second_quadlet=0x%08x",
236238
__entry->packet,
239+
__entry->card_index,
237240
__entry->generation,
238241
__entry->first_quadlet,
239242
__entry->second_quadlet

0 commit comments

Comments
 (0)