From nobody Thu Feb 12 10:57:17 2026 Received: from fhigh5-smtp.messagingengine.com (fhigh5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7238143C41 for ; Thu, 13 Jun 2024 13:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284488; cv=none; b=C2dUjHNk8CwRd6H8m4HsMcsgrEOhq5vWV2gmw0T/BbIVl2QIxXfx40WNYiVZf0886NU8cP4iaXmyI6eDjwSF/G1Pmf72CFIBd86MY8ESX3iSwv22SccvbqmngsCsBjGzeSv9P51IWk9VZ98YgiyQoG9qAAwYyVTXzjvpzlys/HE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284488; c=relaxed/simple; bh=vPxnk30Zd1siuecB0EfxylME7Zg+Lw/YtROsl5nnZFc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dqc95BbApvhhGXUf1PwDL4IYHXWkllw7KcxKwPGJs1cZXZdyqUMxBEuDcSTifgSZCm9rINp3ClW6/Zr+uRLt5/S+1dMvQjFipf7J1LHPAL/odPMrfpSTtxi5gSGxnf4AZXmL5aaykXXORKhozlIlUxNg+hhdpk3x8SSL8fQFQUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=JdpUn8lC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=HqPOEfgc; arc=none smtp.client-ip=103.168.172.156 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="JdpUn8lC"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="HqPOEfgc" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id DD7451140116; Thu, 13 Jun 2024 09:14:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 13 Jun 2024 09:14:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284485; x= 1718370885; bh=NvQzQ47m1U5OGfyvPMSQ/8AM7Gju2h3IEllXTQfsmL0=; b=J dpUn8lCinPAti/1z3AaRXC2eM8IzqpM0hH9khCFIarnMriHSG47ChkNMekxTtTaN vJELFnO5d6D47MDBcw569ePg3UK+Fi4QGilXslv0HnteLJLAX36nRjraB+PQGgrc q5jz7J88wkBKDpfO9I/Tf9scns8/bM/cSKfvWTtDOG9BgQLP2UcF4UE6+h0Om36B cZNmEaN0gWFJSB4B+J+GpmoahmdnR6FyFcrfsFlzQ2b3TcGBXLUU8LGoMwG9LIhE rBYEbQweNKQfgHLB0Tkym1CcrdapEycC8wloqwfYOg6G3MgBEaMxvL/eoTckmSt1 04hLPhPOjX+pJUvyKtV/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284485; x= 1718370885; bh=NvQzQ47m1U5OGfyvPMSQ/8AM7Gju2h3IEllXTQfsmL0=; b=H qPOEfgcXQbBaeAEtVCT5Fk7rdzcZ3hkCI+IyP+7WKn/+uh7xziPBErRS8e98760b ckaokiZSAjbTbJu0TkWmaDYqkSx164Vt9yQ+cQ/g7SCbVy6SjAOoZCoT0+rOrRFj k0YlWvWBySkw+Z6cgFiSpTSJLWUBLnmMEAh1QkyTyC/EUTjcZwTd4KwW/qlv9bmF B9d+E42SsKIyz397cReb9M6OGIvON3DtXR4JOJfiwfaYiNsaKi6Zt5Y5/NTk/Ou5 RHIfzPU5IwDVGBQEWT2WQNep6tEVJpibEsz/XoJ6Sm2LIPBR7ZV/GgDzteddm96N y9QjPrepyQfTMh0I9LqVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:44 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/8] firewire: core: record card index in tracepoinrts events derived from async_outbound_complete_template Date: Thu, 13 Jun 2024 22:14:33 +0900 Message-ID: <20240613131440.431766-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-transaction.c | 6 +++--- include/trace/events/firewire.h | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index 571fdff65c2b..de75e758fd07 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -174,8 +174,8 @@ static void transmit_complete_callback(struct fw_packet= *packet, struct fw_transaction *t =3D container_of(packet, struct fw_transaction, packet); =20 - trace_async_request_outbound_complete((uintptr_t)t, packet->generation, p= acket->speed, - status, packet->timestamp); + trace_async_request_outbound_complete((uintptr_t)t, card->index, packet->= generation, + packet->speed, status, packet->timestamp); =20 switch (status) { case ACK_COMPLETE: @@ -674,7 +674,7 @@ static void free_response_callback(struct fw_packet *pa= cket, { struct fw_request *request =3D container_of(packet, struct fw_request, re= sponse); =20 - trace_async_response_outbound_complete((uintptr_t)request, packet->genera= tion, + trace_async_response_outbound_complete((uintptr_t)request, card->index, p= acket->generation, packet->speed, status, packet->timestamp); =20 // Decrease the reference count since not at in-flight. diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index d695a560673f..ca6ea9bd1eba 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -71,10 +71,11 @@ DECLARE_EVENT_CLASS(async_outbound_initiate_template, =20 // The value of status is one of ack codes and rcodes specific to Linux Fi= reWire subsystem. DECLARE_EVENT_CLASS(async_outbound_complete_template, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp), - TP_ARGS(transaction, generation, scode, status, timestamp), + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp), TP_STRUCT__entry( __field(u64, transaction) + __field(u8, card_index) __field(u8, generation) __field(u8, scode) __field(u8, status) @@ -82,14 +83,16 @@ DECLARE_EVENT_CLASS(async_outbound_complete_template, ), TP_fast_assign( __entry->transaction =3D transaction; + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->scode =3D scode; __entry->status =3D status; __entry->timestamp =3D timestamp; ), TP_printk( - "transaction=3D0x%llx generation=3D%u scode=3D%u status=3D%u timestamp= =3D0x%04x", + "transaction=3D0x%llx card_index=3D%u generation=3D%u scode=3D%u status= =3D%u timestamp=3D0x%04x", __entry->transaction, + __entry->card_index, __entry->generation, __entry->scode, __entry->status, @@ -144,8 +147,8 @@ DEFINE_EVENT(async_outbound_initiate_template, async_re= quest_outbound_initiate, ); =20 DEFINE_EVENT(async_outbound_complete_template, async_request_outbound_comp= lete, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp), - TP_ARGS(transaction, generation, scode, status, timestamp) + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp) ); =20 DEFINE_EVENT(async_inbound_template, async_response_inbound, @@ -194,8 +197,8 @@ DEFINE_EVENT_PRINT(async_outbound_initiate_template, as= ync_response_outbound_ini ); =20 DEFINE_EVENT(async_outbound_complete_template, async_response_outbound_com= plete, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp), - TP_ARGS(transaction, generation, scode, status, timestamp) + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp) ); =20 #undef ASYNC_HEADER_GET_DESTINATION --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fhigh5-smtp.messagingengine.com (fhigh5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50B791442ED for ; Thu, 13 Jun 2024 13:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284490; cv=none; b=Ek5GwTwXN9MZ43obcZL6igji3gRLE/T0VS7rrCd6hAu7q42S0cOaiXfnn6yUEJc/t00CSom1eu6PFCtnlPlzl3+bCNMX4Zu2dHZW7sq640zwyZVRXmix0T2bpESMxWh4rDyHYx7XOBYqdcQb8FbTKSxIRcOlgx6FE25/XSiAAqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284490; c=relaxed/simple; bh=+ZTeo/Hizo+1zprBXQtN0qsNyF9Bv+qpPIaa1bDsTbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KG6y2ixNqYYhSGLhS1ntMagd6kK4rUohpr0PMX5BrJu8QLLuT69yRT1+DmcL8/JS3fXeNWOBWe6hqvIWsKGI/gSsU0uYcbhqcsM7ML8TAxxMNX8LdwTPl6bku6sA52fE+BXmBR/l4Uac0z/V30QTIa9sClc61XpIt2kQM16B+AQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=gnwcf8mF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Ih9Qj/k2; arc=none smtp.client-ip=103.168.172.156 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="gnwcf8mF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ih9Qj/k2" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 64B2311400B7; Thu, 13 Jun 2024 09:14:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 13 Jun 2024 09:14:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284487; x= 1718370887; bh=GSAYRBUvcjGEeAPQd68KE4zWaTpTf65RgbA4e/6KOeU=; b=g nwcf8mFMrqdgLhjWpeVyTH1fyvITD4tCyk4k4wjRm0ri4Buu3XMXG+T+k0CKWum/ jyxJbNMZw2mQaaJPccfChaczriERktkLAG8w/OIRkC7Vc6xYBxeQCXm5RYHM0tIQ 9sb6x6dtDiYe9xS2nJZ0v0KRlvslcYwJsF0AIrTb30nxbRbcNS8jBfR+YEU8s90A kRsVmEYysI0+qZNwENZoF/GvFHiVc8YeL0Fcm2yuAvMiZD6IlJuq+dyj1StJY9Ai mwzrAl1e/ZK1bIQljtyljADI1Xg/ao+K9sxeW2MDrSfvnSzlvDLTjDqRGd/0Olph Ug29osT1iZcoOvBJZtwgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284487; x= 1718370887; bh=GSAYRBUvcjGEeAPQd68KE4zWaTpTf65RgbA4e/6KOeU=; b=I h9Qj/k2cMyT9k95zlQFDCX9jcS2QIEBkpXxsGdxDmQWBJZJPa5lgFQCs86W/hSyG 4u/wxtmyI9u0F3cp0mHXnFiN4gDe7jjnb3hNpp5PvEcABi1xY+prfo+BNnNL8KSm tfhcMTaapmXZ/CoCQgVHabP7N7TRSUUn3tdg1aXiHdC9tcVgVnFpfIU1GEhPoj+5 JR6iRhyckuBeIvXA3+lz23GQSPMtLwTm/G/ejRS/WYngGGfVFcj+o/uNdn4RY2My dqU2FZGlSFwrjfCZsOt/rs2nsrGoGvQRQH5Oeiw3CR8K1xpxMfN493rvnW0Wma1a UP46maPqBSbL4zBXoAuaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:46 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/8] firewire: core: record card index in tracepoinrts events derived from async_outbound_initiate_template Date: Thu, 13 Jun 2024 22:14:34 +0900 Message-ID: <20240613131440.431766-3-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-transaction.c | 10 ++++++---- include/trace/events/firewire.h | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index de75e758fd07..3f9361d15607 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -398,7 +398,8 @@ void __fw_send_request(struct fw_card *card, struct fw_= transaction *t, int tcode =20 spin_unlock_irqrestore(&card->lock, flags); =20 - trace_async_request_outbound_initiate((uintptr_t)t, generation, speed, t-= >packet.header, payload, + trace_async_request_outbound_initiate((uintptr_t)t, card->index, generati= on, speed, + t->packet.header, payload, tcode_is_read_request(tcode) ? 0 : length / 4); =20 card->driver->send_request(card, &t->packet); @@ -879,9 +880,10 @@ void fw_send_response(struct fw_card *card, // Increase the reference count so that the object is kept during in-flig= ht. fw_request_get(request); =20 - trace_async_response_outbound_initiate((uintptr_t)request, request->respo= nse.generation, - request->response.speed, request->response.header, - data, data ? data_length / 4 : 0); + trace_async_response_outbound_initiate((uintptr_t)request, card->index, + request->response.generation, request->response.speed, + request->response.header, data, + data ? data_length / 4 : 0); =20 card->driver->send_response(card, &request->response); } diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index ca6ea9bd1eba..a3d9916cbad1 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -36,10 +36,11 @@ #define QUADLET_SIZE 4 =20 DECLARE_EVENT_CLASS(async_outbound_initiate_template, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, co= nst u32 *header, const u32 *data, unsigned int data_count), - TP_ARGS(transaction, generation, scode, header, data, data_count), + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, const u32 *header, const u32 *data, unsigned int dat= a_count), + TP_ARGS(transaction, card_index, generation, scode, header, data, data_co= unt), TP_STRUCT__entry( __field(u64, transaction) + __field(u8, card_index) __field(u8, generation) __field(u8, scode) __array(u32, header, ASYNC_HEADER_QUADLET_COUNT) @@ -47,6 +48,7 @@ DECLARE_EVENT_CLASS(async_outbound_initiate_template, ), TP_fast_assign( __entry->transaction =3D transaction; + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->scode =3D scode; memcpy(__entry->header, header, QUADLET_SIZE * ASYNC_HEADER_QUADLET_COUN= T); @@ -54,8 +56,9 @@ DECLARE_EVENT_CLASS(async_outbound_initiate_template, ), // This format is for the request subaction. TP_printk( - "transaction=3D0x%llx generation=3D%u scode=3D%u dst_id=3D0x%04x tlabel= =3D%u tcode=3D%u src_id=3D0x%04x offset=3D0x%012llx header=3D%s data=3D%s", + "transaction=3D0x%llx card_index=3D%u generation=3D%u scode=3D%u dst_id= =3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x%04x offset=3D0x%012llx header= =3D%s data=3D%s", __entry->transaction, + __entry->card_index, __entry->generation, __entry->scode, ASYNC_HEADER_GET_DESTINATION(__entry->header), @@ -142,8 +145,8 @@ DECLARE_EVENT_CLASS(async_inbound_template, ); =20 DEFINE_EVENT(async_outbound_initiate_template, async_request_outbound_init= iate, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, co= nst u32 *header, const u32 *data, unsigned int data_count), - TP_ARGS(transaction, generation, scode, header, data, data_count) + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, const u32 *header, const u32 *data, unsigned int dat= a_count), + TP_ARGS(transaction, card_index, generation, scode, header, data, data_co= unt) ); =20 DEFINE_EVENT(async_outbound_complete_template, async_request_outbound_comp= lete, @@ -178,11 +181,12 @@ DEFINE_EVENT_PRINT(async_inbound_template, async_requ= est_inbound, ); =20 DEFINE_EVENT_PRINT(async_outbound_initiate_template, async_response_outbou= nd_initiate, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, co= nst u32 *header, const u32 *data, unsigned int data_count), - TP_ARGS(transaction, generation, scode, header, data, data_count), + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, const u32 *header, const u32 *data, unsigned int dat= a_count), + TP_ARGS(transaction, card_index, generation, scode, header, data, data_co= unt), TP_printk( - "transaction=3D0x%llx generation=3D%u scode=3D%u dst_id=3D0x%04x tlabel= =3D%u tcode=3D%u src_id=3D0x%04x rcode=3D%u header=3D%s data=3D%s", + "transaction=3D0x%llx card_index=3D%u generation=3D%u scode=3D%u dst_id= =3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x%04x rcode=3D%u header=3D%s dat= a=3D%s", __entry->transaction, + __entry->card_index, __entry->generation, __entry->scode, ASYNC_HEADER_GET_DESTINATION(__entry->header), --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C027D144317 for ; Thu, 13 Jun 2024 13:14:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284491; cv=none; b=kd5PIc3sjYRIBVc1d7pjAtIi7CPMhR9RtM2AorUkmBTnQUrEx7K3sa9DWKYq1HsWK0T+6yYgQVb4sgOHiZxNqxBP8tIQYtuKLsiNOTXulj+DKtDasL7QDOELe9g3bFYJaomTn+N/F1Nap/Z4B6j3v0+hgbUGzkYF4vNsonPqrpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284491; c=relaxed/simple; bh=DNAd5eIRD9yZedPq+Gjt6Mq/bDz4/sayjNafIi7DlJU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V4a5RACzyyIe0BRAp3bmRoNIq7v2IAOY8HEe7BrrX+RXmo4ZEq3MrX8CWFjIAX49QXz31l/xyeU8vq6pb0UvfftXmncmgHkuDgKUfn3Q3jatTt5D6tMBrK8TTgiHFNwVU/X5Z3fBa4vOHWvEowADGDXSv0HZDTtxE19ZZVXNObs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=PHMMmZc7; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hE0I+fm8; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="PHMMmZc7"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hE0I+fm8" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id DEDBE13800CA; Thu, 13 Jun 2024 09:14:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 13 Jun 2024 09:14:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284488; x= 1718370888; bh=BW6OLSA8eA0sNRRDy/oHw2tZ3PYVfyjw3JlPniCEi10=; b=P HMMmZc7O5x27VmnBb5CpUkc8rSV1X7h+YrdVHF5CWA/0XGMbElvIAB47Qn0vX9xs wQaMMj4yOqN4YeyHJO9LAakLhZHXdOnxyg1Mnd+NWxX8eNaYqX4+pAvLIaVzCps5 OSjMWiD0PvJtcxHB2O1skCXdp8/ZzKTEsJj571+nuXyHirgwsQUBkdS8WV4VX8Xd qjrM4TUen3T63zebvRyJUnCImPxvZTiVf78wJSBsIRqOAZYzXivTbwM0QGhjj47n ETbLMfTxHw2JXwynP4ulmckTxUEpA0TVBgtVAv93jG+oD4DgbngL3i+l+dl4PDkS qnqtoOsSz9cPsz7WcutOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284488; x= 1718370888; bh=BW6OLSA8eA0sNRRDy/oHw2tZ3PYVfyjw3JlPniCEi10=; b=h E0I+fm8UCtfEX/OEtBOa0VydLof4+im1td8JWivHwCu379wdWhr1aUkh68LbFtCZ t82NT8F7XEpzBKBNmoJbw14R89riswyxzvhSU+NaHSKIsSb+7HTx9ZOFoLB6eH0M krW1vPcoPZTD4c/tqolVRoznIQkt111ottR15ozBViPlsQcrZmSRgLYJb8hFtRum WXhNu/JMbPJgA38OBDSDHxl+UwptEeQVMDrPL9mGlG4CW9tDwOWx7WQKfG0Mk3Eq mvZmDx5LKLdCedS+6zWlORTILnE5yd22EorCzwI8mXnJ9vDRsuj9kooL/E3QvgP3 5qN8m7SSrWdNnDpDbd7JA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:47 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/8] firewire: core: record card index in tracepoinrts events derived from async_inbound_template Date: Thu, 13 Jun 2024 22:14:35 +0900 Message-ID: <20240613131440.431766-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-transaction.c | 8 ++++---- include/trace/events/firewire.h | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index 3f9361d15607..3503c238f8ae 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -1009,8 +1009,8 @@ void fw_core_handle_request(struct fw_card *card, str= uct fw_packet *p) return; } =20 - trace_async_request_inbound((uintptr_t)request, p->generation, p->speed, = p->ack, - p->timestamp, p->header, request->data, + trace_async_request_inbound((uintptr_t)request, card->index, p->generatio= n, p->speed, + p->ack, p->timestamp, p->header, request->data, tcode_is_read_request(tcode) ? 0 : request->length / 4); =20 offset =3D async_header_get_offset(p->header); @@ -1080,8 +1080,8 @@ void fw_core_handle_response(struct fw_card *card, st= ruct fw_packet *p) } spin_unlock_irqrestore(&card->lock, flags); =20 - trace_async_response_inbound((uintptr_t)t, p->generation, p->speed, p->ac= k, p->timestamp, - p->header, data, data_length / 4); + trace_async_response_inbound((uintptr_t)t, card->index, p->generation, p-= >speed, p->ack, + p->timestamp, p->header, data, data_length / 4); =20 if (!t) { timed_out: diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index a3d9916cbad1..b72f613cfa02 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -105,10 +105,11 @@ DECLARE_EVENT_CLASS(async_outbound_complete_template, =20 // The value of status is one of ack codes and rcodes specific to Linux Fi= reWire subsystem. DECLARE_EVENT_CLASS(async_inbound_template, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp, const u32 *header, const u32 *da= ta, unsigned int data_count), - TP_ARGS(transaction, generation, scode, status, timestamp, header, data, = data_count), + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp, const u= 32 *header, const u32 *data, unsigned int data_count), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp, he= ader, data, data_count), TP_STRUCT__entry( __field(u64, transaction) + __field(u8, card_index) __field(u8, generation) __field(u8, scode) __field(u8, status) @@ -118,6 +119,7 @@ DECLARE_EVENT_CLASS(async_inbound_template, ), TP_fast_assign( __entry->transaction =3D transaction; + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->scode =3D scode; __entry->status =3D status; @@ -127,8 +129,9 @@ DECLARE_EVENT_CLASS(async_inbound_template, ), // This format is for the response subaction. TP_printk( - "transaction=3D0x%llx generation=3D%u scode=3D%u status=3D%u timestamp= =3D0x%04x dst_id=3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x%04x rcode=3D%u= header=3D%s data=3D%s", + "transaction=3D0x%llx card_index=3D%u generation=3D%u scode=3D%u status= =3D%u timestamp=3D0x%04x dst_id=3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x= %04x rcode=3D%u header=3D%s data=3D%s", __entry->transaction, + __entry->card_index, __entry->generation, __entry->scode, __entry->status, @@ -155,16 +158,17 @@ DEFINE_EVENT(async_outbound_complete_template, async_= request_outbound_complete, ); =20 DEFINE_EVENT(async_inbound_template, async_response_inbound, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp, const u32 *header, const u32 *da= ta, unsigned int data_count), - TP_ARGS(transaction, generation, scode, status, timestamp, header, data, = data_count) + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp, const u= 32 *header, const u32 *data, unsigned int data_count), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp, he= ader, data, data_count) ); =20 DEFINE_EVENT_PRINT(async_inbound_template, async_request_inbound, - TP_PROTO(u64 transaction, unsigned int generation, unsigned int scode, un= signed int status, unsigned int timestamp, const u32 *header, const u32 *da= ta, unsigned int data_count), - TP_ARGS(transaction, generation, scode, status, timestamp, header, data, = data_count), + TP_PROTO(u64 transaction, unsigned int card_index, unsigned int generatio= n, unsigned int scode, unsigned int status, unsigned int timestamp, const u= 32 *header, const u32 *data, unsigned int data_count), + TP_ARGS(transaction, card_index, generation, scode, status, timestamp, he= ader, data, data_count), TP_printk( - "transaction=3D0x%llx generation=3D%u scode=3D%u status=3D%u timestamp= =3D0x%04x dst_id=3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x%04x offset=3D0= x%012llx header=3D%s data=3D%s", + "transaction=3D0x%llx card_index=3D%u generation=3D%u scode=3D%u status= =3D%u timestamp=3D0x%04x dst_id=3D0x%04x tlabel=3D%u tcode=3D%u src_id=3D0x= %04x offset=3D0x%012llx header=3D%s data=3D%s", __entry->transaction, + __entry->card_index, __entry->generation, __entry->scode, __entry->status, --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 416BD1448FA for ; Thu, 13 Jun 2024 13:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; cv=none; b=qpljetwhl5q9cKGUpt/wMa5ACDkfrqH5S3aoERr9uTpL4yhbKErmkFM+y1XZuV+Q/PeJecK/21gynG2g2MkkEX4XjBGTlLq518EGyDD926GxjBHXcezQYIpGovx0bjUnDL293rXZMvcBloLAaz3DLZqIfvRqJjjDZEFZTt65FBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; c=relaxed/simple; bh=KLoB45JYegx+ffrktyofSNuiWiItZsJpgRcg101okEY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TFBc1eWNiEaBcVno96snZoZ54hLDUxmNG2RiFqhXP+YUAgvg5KK/avbsuE1N0XRJssB7G0lgPe6i36WLyATO1wS5Cmvfuin4QdrwD4sAevG6MXIJ1SHTLv78RuSyEthXK/aVXsGVD3TjRv4wtM7j2rXPkQHk83GxfrBRz71eKRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=O9yOsORe; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ff3SvrhY; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="O9yOsORe"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ff3SvrhY" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 57AF7138008A; Thu, 13 Jun 2024 09:14:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 13 Jun 2024 09:14:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284490; x= 1718370890; bh=pKmgdIHnHnIlspZLPXht7lfKdMoxfoyma3rtoghKko0=; b=O 9yOsOReifzDzgytpBnqKGj5OtTE3Uc7FWY5pdSmDsaM9WnPKYnyM/GhrLdjbDX72 eBM/qy83wOlS/HWyTm4n9U6V/XtoDrWDRFh3vTSv2PiAj1LA/+YAYxw/5k8pb9tn PvppA51zA+Au+4OvC/4l73pCaV0WeEoLRDEzQP7/eldSzvyEZWQnZGlELlk3XXX4 Ms1EIGk9/A8TEohkY0BpOjOHbhIlRqJDpEFlTUe5OFXg+IgZ/BWOT1yMwp8hUs8a CjjdOmUQaOr6UYaBuZy2MS8VkbSVFSRzM2i6/tggsQplswqrjjtJ2f0t4pTFkSyb gDmk28KTQB2Moq7uiGBzw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284490; x= 1718370890; bh=pKmgdIHnHnIlspZLPXht7lfKdMoxfoyma3rtoghKko0=; b=f f3SvrhYlXQ9Gk85BhEda40+k7gViWQFssF2zVC6nnc2fcEx/yk+wzWuJxYoHERg9 jpOwzWw4FAq6JG9O8AnHiKINGdRa1X0GG2O/C2O6tvh01SzXMBy3R6oDOGcX4/N6 kYbhVmeunOo1BHwqrp6ChyKbF0l352JWU33gpp+4H5aEsa5XOHHa4oS4M/cmYqAA idpYLKI5YMcS0HINa77A/o1Edx9t18vrlqb+bbKbYlX1TADfXGsK6Y87SFJSggO/ jvbgy8p1+GTyiUoKoqv6pl7vDYofdATGfGbgXgvbyrXj7mJBNV5YtodEoHeD0i3W p1480UxkJeDiNBv5x0w2A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:49 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/8] firewire: core: record card index in async_phy_outbound_initiate tracepoints event Date: Thu, 13 Jun 2024 22:14:36 +0900 Message-ID: <20240613131440.431766-5-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-cdev.c | 4 ++-- drivers/firewire/core-transaction.c | 2 +- include/trace/events/firewire.h | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 55993c9e0b90..ff8739f96af5 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -1659,8 +1659,8 @@ static int ioctl_send_phy_packet(struct client *clien= t, union ioctl_arg *arg) memcpy(pp->data, a->data, sizeof(a->data)); } =20 - trace_async_phy_outbound_initiate((uintptr_t)&e->p, e->p.generation, e->p= .header[1], - e->p.header[2]); + trace_async_phy_outbound_initiate((uintptr_t)&e->p, card->index, e->p.gen= eration, + e->p.header[1], e->p.header[2]); =20 card->driver->send_request(card, &e->p); =20 diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index 3503c238f8ae..e522dc3d9897 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -504,7 +504,7 @@ void fw_send_phy_config(struct fw_card *card, phy_config_packet.generation =3D generation; reinit_completion(&phy_config_done); =20 - trace_async_phy_outbound_initiate((uintptr_t)&phy_config_packet, + trace_async_phy_outbound_initiate((uintptr_t)&phy_config_packet, card->in= dex, phy_config_packet.generation, phy_config_packet.header[1], phy_config_packet.header[2]); =20 diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index b72f613cfa02..a59dc26b2a53 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -217,23 +217,26 @@ DEFINE_EVENT(async_outbound_complete_template, async_= response_outbound_complete, #undef ASYNC_HEADER_GET_RCODE =20 TRACE_EVENT(async_phy_outbound_initiate, - TP_PROTO(u64 packet, unsigned int generation, u32 first_quadlet, u32 seco= nd_quadlet), - TP_ARGS(packet, generation, first_quadlet, second_quadlet), + TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, u3= 2 first_quadlet, u32 second_quadlet), + TP_ARGS(packet, card_index, generation, first_quadlet, second_quadlet), TP_STRUCT__entry( __field(u64, packet) + __field(u8, card_index) __field(u8, generation) __field(u32, first_quadlet) __field(u32, second_quadlet) ), TP_fast_assign( __entry->packet =3D packet; + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->first_quadlet =3D first_quadlet; __entry->second_quadlet =3D second_quadlet ), TP_printk( - "packet=3D0x%llx generation=3D%u first_quadlet=3D0x%08x second_quadlet= =3D0x%08x", + "packet=3D0x%llx card_index=3D%u generation=3D%u first_quadlet=3D0x%08x = second_quadlet=3D0x%08x", __entry->packet, + __entry->card_index, __entry->generation, __entry->first_quadlet, __entry->second_quadlet --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFC5A144D10 for ; Thu, 13 Jun 2024 13:14:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; cv=none; b=XFVloQL3kvmU+gdT3MDjPWA0K6J7kEbVFTx8hJphvzspB646jfu0q3XqqUbty4S+3ZSiCVVGtQmVqjzt3Sq2LfRF80CRjgOPv+WV3QhfT6r9q+pU+OirDCez5PBGoAtKfEZ5LIPJqKFER/sxnvk+rBOS517a+3v/vPTP5cUWvrA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; c=relaxed/simple; bh=7L1gd/DIa6bveNbIw8EQeC/U0pFIIXBZQ3326vb4SvM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HMQr6xf9/dB32L6TJUDXvqYE9zbjK0CD9bMwxCHSMxWOWAey3EgvVkFDxPmaRxK2zfxLimSdR+sf/ZvcH/KvbOx6xDbxU6jW/5bIWoWc7y+IInCi9so29UwYuFDvHoP3qtDhKh1GzAZRxf28xDxxrR/WPOMBGPm/srLtjDA2qcM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=AuFr9FRx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DFMNXnWv; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="AuFr9FRx"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DFMNXnWv" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id D50521380099; Thu, 13 Jun 2024 09:14:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 13 Jun 2024 09:14:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284491; x= 1718370891; bh=a3iKFf3cgzA8fuhlXuxo5mFXhLHZpHmIQrt+HGCliT0=; b=A uFr9FRxT94ZornUIuVu0mtp0WshtQK4TabiCvmYdjWk2oBswq4Bp8cfq7vP7NUXI dBSpciW7RhAKmOPsQU0vF2Ah+276ymDh+F7IJO2161qUk9JbN19Lrq+/wR2FmVeC r2jr2CmqLjYI4kOOm9uAdIU8oS6Iwt01VHww1bh5bE5KKguOG7oPdeMxyVF3r3Px 7R2NPrEhzRsz5Cx1BVahlO7heuHEcGhb828Af+b4ND0ftDXHkaJMQSgfMb8xvONW lgFknLDMRqiBg2MZ4ktIrOKAiLjITIhJNosGi+ddv9iaUNRjAhllGwP4ONJw/sru vpcddIyoWmCGQCO7HtMmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284491; x= 1718370891; bh=a3iKFf3cgzA8fuhlXuxo5mFXhLHZpHmIQrt+HGCliT0=; b=D FMNXnWvNeoQ8bv/xK7GsC1IMCuzZIOgQt4PedrVK7SEer/qFyHwOTX4ta9TZJ41S OqTvkW+NhruRmTh8YjQbA8TqXCib57vMD2M1Cdo/by1kpDqird8V4koAhXJrEUOX PgU81kJv9/XgfYVPe6eYTtvhanv58ZdJo1kU5kx0H2ywWm3fVf68Fog0/jRn57D7 zX1+xcw8IMl1RZd94gUL8wPuyXSYH0C/MGVNSRn3RI/4ROEhmeOoUqwBNqNF7jly hsO4iFK2wFEYt7OnyniFbL7YOY0VpDBxL2cdRSEsKuPWy/HWhAxiW/03N+7CKvOr k0HPUbcW0lBlyV7URLjhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:50 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 5/8] firewire: core: record card index in async_phy_outbound_complete tracepoints event Date: Thu, 13 Jun 2024 22:14:37 +0900 Message-ID: <20240613131440.431766-6-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-cdev.c | 2 +- drivers/firewire/core-transaction.c | 2 +- include/trace/events/firewire.h | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index ff8739f96af5..9a7dc90330a3 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -1559,7 +1559,7 @@ static void outbound_phy_packet_callback(struct fw_pa= cket *packet, struct client *e_client =3D e->client; u32 rcode; =20 - trace_async_phy_outbound_complete((uintptr_t)packet, status, packet->gene= ration, + trace_async_phy_outbound_complete((uintptr_t)packet, card->index, status,= packet->generation, packet->timestamp); =20 switch (status) { diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index e522dc3d9897..bd5a467cfd60 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -464,7 +464,7 @@ static DECLARE_COMPLETION(phy_config_done); static void transmit_phy_packet_callback(struct fw_packet *packet, struct fw_card *card, int status) { - trace_async_phy_outbound_complete((uintptr_t)packet, packet->generation, = status, + trace_async_phy_outbound_complete((uintptr_t)packet, card->index, packet-= >generation, status, packet->timestamp); complete(&phy_config_done); } diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index a59dc26b2a53..61c7a2461fbc 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -244,23 +244,26 @@ TRACE_EVENT(async_phy_outbound_initiate, ); =20 TRACE_EVENT(async_phy_outbound_complete, - TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsign= ed int timestamp), - TP_ARGS(packet, generation, status, timestamp), + TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, un= signed int status, unsigned int timestamp), + TP_ARGS(packet, card_index, generation, status, timestamp), TP_STRUCT__entry( __field(u64, packet) + __field(u8, card_index) __field(u8, generation) __field(u8, status) __field(u16, timestamp) ), TP_fast_assign( __entry->packet =3D packet; + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->status =3D status; __entry->timestamp =3D timestamp; ), TP_printk( - "packet=3D0x%llx generation=3D%u status=3D%u timestamp=3D0x%04x", + "packet=3D0x%llx card_index=3D%u generation=3D%u status=3D%u timestamp= =3D0x%04x", __entry->packet, + __entry->card_index, __entry->generation, __entry->status, __entry->timestamp --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4036E143C46 for ; Thu, 13 Jun 2024 13:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; cv=none; b=gDOQ1/RRDiNQ6QV6jwjEjodcA4kgY9bIrAl1KT6u+Uylzkjc59E7hs4+PAo0QWdqGcYulCxXKGbObgPN69h1Z/+Mvi4rjwLM8XC6+Qidth6+pCetPLDc7KlOyMudSuvjz51A2JpRI3DjyAwU6Onz7xTvnYK8MWaiJugRohE+g4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284495; c=relaxed/simple; bh=Wcfvjsc31U61Lz2J2HCCtjnjbOjubcBE6IHU4lEMHFw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GDpUwlZ57RWysAqWZNgGfwlIyq2aqfpG+MM9/tmjWhdrIaZlsGiVZjzcLujOziO6IqZTGJlPoH1O9C6y2uV/rAZsPmThRZCpLBAC33u5TW3CEheLcCFhpRS8w7xtl+nFy/L36eiIhwyQ9VTfsJv+PBBjo7IBXCFNM5LF3GiJAJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=h/BaPTUw; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=MfT/OxSD; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="h/BaPTUw"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MfT/OxSD" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 5FCC613800AF; Thu, 13 Jun 2024 09:14:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 13 Jun 2024 09:14:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284493; x= 1718370893; bh=AGsv0aysTD3ZzDyuMSeXNAH/CM0Cg2AP7pJ8uuAcP8M=; b=h /BaPTUw2CLEZtN94+3IrZ7aXazkU/pdR/IUfy/HSUR0uRLiUPVIKMZjx16O96FGB EHt9Zs87ia1b97ClzUyDJNRgOzVRERDEcziWDuCpbu8h7+zkPNRFitugUok4Dx3K SNnGlskUPQbq1NQOY9XUXtTi5/Hgi1zrOPyFEcQ1l+KOcuW02IMLakVoAshsN4pG jHT3b2jqkyPonjsOOD9+S60EFWZqtYJKQRht97RUdKkW4o9Abtux8ztzd6bphKDB uRQdk82rQARF7V4PGY8uXOsQPkchzUHpeD7KYAofnUse18NGkpA1N+dqVa5Z7pkp EIdduoDdogYPHzHQVpupA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284493; x= 1718370893; bh=AGsv0aysTD3ZzDyuMSeXNAH/CM0Cg2AP7pJ8uuAcP8M=; b=M fT/OxSDC69y6iphM7EprcDjh5vlo9SqaefE7d0MICAQwlkKDh5Ma44YWNZaQ+8Jj ga1+P8SNLclcxo0uGlmNFzDCnBUSunZstXlvzJ27FiC5ltguMylvb4HPX3zYQISs MMdTg2SX88StPEJ/NlRYw51DxC92P40TUb7PdlcNcsw+5D5wRsurFPcpceur52c1 RVfpS62zKkGOJFDiJcD1KlweJaPSlW5EFC5tInUdKNOYcjl2q9e8LfW1c7JuwYoH oUR8bVZzdPHFEAmNOt98MqIu83eLGppSdeYAI4wVq1hCqumJQFq9uBJQExcKXRHO ADJd3AxfxzSuc4bWONnVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:52 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 6/8] firewire: core: record card index in async_phy_inbound tracepoints event Date: Thu, 13 Jun 2024 22:14:38 +0900 Message-ID: <20240613131440.431766-7-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-transaction.c | 2 +- include/trace/events/firewire.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index bd5a467cfd60..76ab6a209768 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -997,7 +997,7 @@ void fw_core_handle_request(struct fw_card *card, struc= t fw_packet *p) =20 tcode =3D async_header_get_tcode(p->header); if (tcode_is_link_internal(tcode)) { - trace_async_phy_inbound((uintptr_t)p, p->generation, p->ack, p->timestam= p, + 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; diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index 61c7a2461fbc..e5524fc71880 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -271,10 +271,11 @@ TRACE_EVENT(async_phy_outbound_complete, ); =20 TRACE_EVENT(async_phy_inbound, - TP_PROTO(u64 packet, unsigned int generation, unsigned int status, unsign= ed int timestamp, u32 first_quadlet, u32 second_quadlet), - TP_ARGS(packet, generation, status, timestamp, first_quadlet, second_quad= let), + TP_PROTO(u64 packet, unsigned int card_index, unsigned int generation, un= signed int status, unsigned int timestamp, u32 first_quadlet, u32 second_qu= adlet), + 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 =3D second_quadlet ), TP_printk( - "packet=3D0x%llx generation=3D%u status=3D%u timestamp=3D0x%04x first_qu= adlet=3D0x%08x second_quadlet=3D0x%08x", + "packet=3D0x%llx card_index=3D%u generation=3D%u status=3D%u timestamp= =3D0x%04x first_quadlet=3D0x%08x second_quadlet=3D0x%08x", __entry->packet, + __entry->card_index, __entry->generation, __entry->status, __entry->timestamp, --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B962F144D15 for ; Thu, 13 Jun 2024 13:14:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284497; cv=none; b=HC99hXWnaN6ucMfu703RL98+cHMIKQrKkYDo0FWsALoS3qA6kUy+K3zLs9Nk03nkANmEFWOVnZcm/6TmaXrpH/1kvxhrvrs13ueU3grN8/s1bRH5NJF8wSpT0BJdoYPCHvOVghTzlLuc8jsfwV54xjgljby0cfbvCr/i2gvjegg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284497; c=relaxed/simple; bh=zj6JtbVTTviJo7WTtMwH2lictg2VkxG4N+wyZkqqFEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PSWBRzXd2fMzdwDOIDNvhxSDipXVOXPrx25A+t56LYy7WC69JAFA6jlpqRK5I1H5DmaBOR2StrB3XdP4sUF4FciozrczzBiorl6fHowRbmVjiRcIjBTY6maeMNvsXWmF5CJpCAAoqCyusNQzy13MYwKNjfk3HtYmEzR8/E0FqEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=hiJJOTKa; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jAMC1sPR; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="hiJJOTKa"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jAMC1sPR" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id D656E13800ED; Thu, 13 Jun 2024 09:14:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 13 Jun 2024 09:14:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284494; x= 1718370894; bh=rCStrtW4Fkq1R+S/nsCfskDATiiOElcsAJ727pxmbL8=; b=h iJJOTKa2tZ1Cwbrg/PQHqLF5kjBr5bkzpp4/pvc6YSox9/nqp2CLfqEJZ/WiY1GQ rLmSNxsno4EZCMcB8NDFHmFPXV26LA2qmC1RCeF5O4C/jYezt84Qdytf+9rggTab nTNWvBxY42hdofgIzn+iPokkQC1kFzZKTCygDg8WrwvPTvsaUdEr7ncgce/JFb2g 95V79AKut7GsOOaeql82shKoX1An0DsQ9ExTUHujeCn5r5R/pCfzpF3ABmdJ4yIG 394U+8ad1Ol1sfS+8fUN6WGxIuSPQLH8iTqXHPO5b5vPdU4TutKb+Sl9RdsAqYWI Elh2j8fVDr7nCQLmyQi9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284494; x= 1718370894; bh=rCStrtW4Fkq1R+S/nsCfskDATiiOElcsAJ727pxmbL8=; b=j AMC1sPRhsp7OfSe23FR/2d5Ifjf20WGjG+J3a6UKLd32/Ix/DPeSSrcpnn0RoQdN q7EuedSAGUA3CXKym2Dnk5Ybryz0kzI8N2hAyvwwOSwWlD2CH3tIiGgurZ8tVcA6 bk+dWVeZM1Ja3BsnM0wIFdJAbgLcVs1/kbl9WT498Vgw6VESMb0+Eo2lR0dPbG5M rVbhexA1DoUko/xbvmgMs7vxe2C/Qgq02oS159sJfKCknrM9knVc042/d2jVC07h oTUPoFpe2/+Cbgt4tZaoUAs49BJD0icOB9S+lg281szE+oOhxhiRVUrnGYA103hf J8rlrh02XjiGGVv1NdioQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:53 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 7/8] firewire: core: record card index in tracepoinrts events derived from bus_reset_arrange_template Date: Thu, 13 Jun 2024 22:14:39 +0900 Message-ID: <20240613131440.431766-8-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-card.c | 6 +++--- include/trace/events/firewire.h | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 127d87e3a153..f8b99dd6cd82 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -222,14 +222,14 @@ static int reset_bus(struct fw_card *card, bool short= _reset) int reg =3D short_reset ? 5 : 1; int bit =3D short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET; =20 - trace_bus_reset_initiate(card->generation, short_reset); + trace_bus_reset_initiate(card->index, card->generation, short_reset); =20 return card->driver->update_phy_reg(card, reg, 0, bit); } =20 void fw_schedule_bus_reset(struct fw_card *card, bool delayed, bool short_= reset) { - trace_bus_reset_schedule(card->generation, short_reset); + trace_bus_reset_schedule(card->index, card->generation, short_reset); =20 /* We don't try hard to sort out requests of long vs. short resets. */ card->br_short =3D short_reset; @@ -249,7 +249,7 @@ static void br_work(struct work_struct *work) /* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */ if (card->reset_jiffies !=3D 0 && time_before64(get_jiffies_64(), card->reset_jiffies + 2 * HZ)) { - trace_bus_reset_postpone(card->generation, card->br_short); + trace_bus_reset_postpone(card->index, card->generation, card->br_short); =20 if (!queue_delayed_work(fw_workqueue, &card->br_work, 2 * HZ)) fw_card_put(card); diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index e5524fc71880..e6485051f546 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -303,36 +303,39 @@ TRACE_EVENT(async_phy_inbound, ); =20 DECLARE_EVENT_CLASS(bus_reset_arrange_template, - TP_PROTO(unsigned int generation, bool short_reset), - TP_ARGS(generation, short_reset), + TP_PROTO(unsigned int card_index, unsigned int generation, bool short_res= et), + TP_ARGS(card_index, generation, short_reset), TP_STRUCT__entry( + __field(u8, card_index) __field(u8, generation) __field(bool, short_reset) ), TP_fast_assign( + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->short_reset =3D short_reset; ), TP_printk( - "generation=3D%u short_reset=3D%s", + "card_index=3D%u generation=3D%u short_reset=3D%s", + __entry->card_index, __entry->generation, __entry->short_reset ? "true" : "false" ) ); =20 DEFINE_EVENT(bus_reset_arrange_template, bus_reset_initiate, - TP_PROTO(unsigned int generation, bool short_reset), - TP_ARGS(generation, short_reset) + TP_PROTO(unsigned int card_index, unsigned int generation, bool short_res= et), + TP_ARGS(card_index, generation, short_reset) ); =20 DEFINE_EVENT(bus_reset_arrange_template, bus_reset_schedule, - TP_PROTO(unsigned int generation, bool short_reset), - TP_ARGS(generation, short_reset) + TP_PROTO(unsigned int card_index, unsigned int generation, bool short_res= et), + TP_ARGS(card_index, generation, short_reset) ); =20 DEFINE_EVENT(bus_reset_arrange_template, bus_reset_postpone, - TP_PROTO(unsigned int generation, bool short_reset), - TP_ARGS(generation, short_reset) + TP_PROTO(unsigned int card_index, unsigned int generation, bool short_res= et), + TP_ARGS(card_index, generation, short_reset) ); =20 TRACE_EVENT(bus_reset_handle, --=20 2.43.0 From nobody Thu Feb 12 10:57:17 2026 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3723F14533F for ; Thu, 13 Jun 2024 13:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284498; cv=none; b=j0VTZU8ap85zut9CA57XVqpi67zFx2UG2Hk0mlIrcY1pzx+M1RVu63agk9wvwpjbwXK4yCfsChjfTjMiZuV7REZ4LAFgAfupkFhNPV5ZAVLTYiNvczeAmyNLqZTvNUkTWWL4VgdfayyOuV+EYJO9odUARwpiFXSBKrdV4FBc7l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284498; c=relaxed/simple; bh=aCGZrzVKo9BdlbEpBns4eiZQ0q3VOd6LplzuPlXQRDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HZ7R9nJBJDrg23AAqDTl7uHm8wYRTUNiuMMapF+0uVohu1cwN9PaNeNgbu++KCqaJ7F7d8t1O3lSbjA3WJEZ57mWmWhUBS4N/g2GUiXV5n5la9ws7oVRTQmUU+GdzTKhxbbZyTUrYfmFHxKN1TV80U5kEakP7tehWJidOjSwdoQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=AxrXim1y; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=L7AEWbE1; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="AxrXim1y"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="L7AEWbE1" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 5698B13800CA; Thu, 13 Jun 2024 09:14:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 13 Jun 2024 09:14:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1718284496; x= 1718370896; bh=I8uNY8Z0JU6uknnPbF1XPQmmJMnq42rmOIUNt32Gy64=; b=A xrXim1ypDdQX1Mzo0lQ4tgvnLpiEhUVlUMhjAi1KagBDHYejLdLLAfO2Qk89KGV/ I0BpY8JhMNvnjX/3xBKwDStXHDDx++EsybLrNE8QHWdpKqPNdEGv8mRyf75X8HBt 7Vjoo7bgXzlxZf2bjzXHzFqQrtltnWNRWRAeluXHUbL9aJX3lDhQMaxWxPMcWzWW uvAigPOPM1oMyg6TiFFAWEKH2pqm7C8f4SBNeE9oPUJQ0IKLD8wXUEL1oVJXs6Y4 HlP6bxYoVmyWfCYxepoE59Jfc7k4+B9oB5ERGcRO0NgVOK3t+xyf8bXnwKqQEB81 imsj5V8zLiqTLA6vCyUQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718284496; x= 1718370896; bh=I8uNY8Z0JU6uknnPbF1XPQmmJMnq42rmOIUNt32Gy64=; b=L 7AEWbE1zUxczl1mBq9XIy9bOWL0x3U4xYJRf1oDApya9Jrz5W/IWhs9riI8NMYn8 6FfmtqddN7GgMDi6w8OXFp95xlwcTru7q65Gv5fuhPAN6Dz5buz1crufra+aky5s dfDb2nT27Wt0Oaf8Zv1nWZVIA8yynMDSqRVwS/VXc09KYmXEb1Myj3IPwYcYIOW1 eZ7SmKLmWQUNsW8Ce8CuceZv5zm+9nrLd+DkOm9mVEQjBOiktdRSN0D7eoydSPeH OvujpNIRrTpAfikAl1YpuVpT0vBGHoUOEUsL53dr4NC1cALOGwxu/NIRXSXRAKP9 nx4R7179URoIlwmFk79HQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 09:14:55 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 8/8] firewire: core: record card index in bus_reset_handle tracepoints event Date: Thu, 13 Jun 2024 22:14:40 +0900 Message-ID: <20240613131440.431766-9-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613131440.431766-1-o-takashi@sakamocchi.jp> References: <20240613131440.431766-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The bus reset event occurs in the bus managed by one of 1394 OHCI controller in Linu system, however the existing tracepoints events has the lack of data about it to distinguish the issued hardware from the others. This commit adds card_index member into event structure to store the index of host controller in use, and prints it. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-topology.c | 2 +- include/trace/events/firewire.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topol= ogy.c index 837cc44d8d9f..8107eebd4296 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -508,7 +508,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int= node_id, int generation, struct fw_node *local_node; unsigned long flags; =20 - trace_bus_reset_handle(generation, node_id, bm_abdicate, self_ids, self_i= d_count); + trace_bus_reset_handle(card->index, generation, node_id, bm_abdicate, sel= f_ids, self_id_count); =20 spin_lock_irqsave(&card->lock, flags); =20 diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index e6485051f546..5ccc0d91b220 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -339,22 +339,25 @@ DEFINE_EVENT(bus_reset_arrange_template, bus_reset_po= stpone, ); =20 TRACE_EVENT(bus_reset_handle, - TP_PROTO(unsigned int generation, unsigned int node_id, bool bm_abdicate,= u32 *self_ids, unsigned int self_id_count), - TP_ARGS(generation, node_id, bm_abdicate, self_ids, self_id_count), + TP_PROTO(unsigned int card_index, unsigned int generation, unsigned int n= ode_id, bool bm_abdicate, u32 *self_ids, unsigned int self_id_count), + TP_ARGS(card_index, generation, node_id, bm_abdicate, self_ids, self_id_c= ount), TP_STRUCT__entry( + __field(u8, card_index) __field(u8, generation) __field(u8, node_id) __field(bool, bm_abdicate) __dynamic_array(u32, self_ids, self_id_count) ), TP_fast_assign( + __entry->card_index =3D card_index; __entry->generation =3D generation; __entry->node_id =3D node_id; __entry->bm_abdicate =3D bm_abdicate; memcpy(__get_dynamic_array(self_ids), self_ids, __get_dynamic_array_len(= self_ids)); ), TP_printk( - "generation=3D%u node_id=3D0x%04x bm_abdicate=3D%s self_ids=3D%s", + "card_index=3D%u generation=3D%u node_id=3D0x%04x bm_abdicate=3D%s self_= ids=3D%s", + __entry->card_index, __entry->generation, __entry->node_id, __entry->bm_abdicate ? "true" : "false", --=20 2.43.0