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

Commit 810f2aa

Browse files
committed
firewire: core: record card index in async_phy_outbound_complete 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-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent 3cb44a7 commit 810f2aa

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/firewire/core-cdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
15591559
struct client *e_client = e->client;
15601560
u32 rcode;
15611561

1562-
trace_async_phy_outbound_complete((uintptr_t)packet, status, packet->generation,
1562+
trace_async_phy_outbound_complete((uintptr_t)packet, card->index, status, packet->generation,
15631563
packet->timestamp);
15641564

15651565
switch (status) {

drivers/firewire/core-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static DECLARE_COMPLETION(phy_config_done);
464464
static void transmit_phy_packet_callback(struct fw_packet *packet,
465465
struct fw_card *card, int status)
466466
{
467-
trace_async_phy_outbound_complete((uintptr_t)packet, packet->generation, status,
467+
trace_async_phy_outbound_complete((uintptr_t)packet, card->index, packet->generation, status,
468468
packet->timestamp);
469469
complete(&phy_config_done);
470470
}

include/trace/events/firewire.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,23 +244,26 @@ TRACE_EVENT(async_phy_outbound_initiate,
244244
);
245245

246246
TRACE_EVENT(async_phy_outbound_complete,
247-
TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsigned int timestamp),
248-
TP_ARGS(packet, generation, status, timestamp),
247+
TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, unsigned int status, unsigned int timestamp),
248+
TP_ARGS(packet, card_index, generation, status, timestamp),
249249
TP_STRUCT__entry(
250250
__field(u64, packet)
251+
__field(u8, card_index)
251252
__field(u8, generation)
252253
__field(u8, status)
253254
__field(u16, timestamp)
254255
),
255256
TP_fast_assign(
256257
__entry->packet = packet;
258+
__entry->card_index = card_index;
257259
__entry->generation = generation;
258260
__entry->status = status;
259261
__entry->timestamp = timestamp;
260262
),
261263
TP_printk(
262-
"packet=0x%llx generation=%u status=%u timestamp=0x%04x",
264+
"packet=0x%llx card_index=%u generation=%u status=%u timestamp=0x%04x",
263265
__entry->packet,
266+
__entry->card_index,
264267
__entry->generation,
265268
__entry->status,
266269
__entry->timestamp

0 commit comments

Comments
 (0)