mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
firewire: core: add tracepoints events for asynchronous outbound request
In a view of core transaction service, the asynchronous outbound request
consists of two stages; initiation and completion. This commit adds a pair
of event for them.
The following example is for asynchronous lock request with compare_swap
code to offset 0x'ffff'f000'0904 in node 0xffc0.
async_request_outbound_initiate: \
transaction=0xffff955fc6a07a10 generation=5 scode=2 dst_id=0xffc0 \
tlabel=54 tcode=9 src_id=0xffc1 offset=0xfffff0000904 \
header={0xffc0d990,0xffc1ffff,0xf0000904,0x80002}
data={0x80,0x940181}
async_request_outbound_complete: \
transaction=0xffff955fc6a07a10 generation=5 scode=2 status=2 \
timestamp=0xd887
Link: https://lore.kernel.org/r/20240429043218.609398-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include "core.h"
|
||||
#include <trace/events/firewire.h>
|
||||
#include "packet-header-definitions.h"
|
||||
|
||||
#define HEADER_DESTINATION_IS_BROADCAST(header) \
|
||||
@@ -173,6 +174,9 @@ static void transmit_complete_callback(struct fw_packet *packet,
|
||||
struct fw_transaction *t =
|
||||
container_of(packet, struct fw_transaction, packet);
|
||||
|
||||
trace_async_request_outbound_complete((uintptr_t)t, packet->generation, packet->speed,
|
||||
status, packet->timestamp);
|
||||
|
||||
switch (status) {
|
||||
case ACK_COMPLETE:
|
||||
close_transaction(t, card, RCODE_COMPLETE, packet->timestamp);
|
||||
@@ -394,6 +398,9 @@ void __fw_send_request(struct fw_card *card, struct fw_transaction *t, int tcode
|
||||
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
trace_async_request_outbound_initiate((uintptr_t)t, generation, speed, t->packet.header, payload,
|
||||
tcode_is_read_request(tcode) ? 0 : length / 4);
|
||||
|
||||
card->driver->send_request(card, &t->packet);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__fw_send_request);
|
||||
|
||||
Reference in New Issue
Block a user