From nobody Thu Feb 12 09:34:13 2026 Received: from fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) (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 75E8863D for ; Fri, 14 Jun 2024 00:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718325780; cv=none; b=aJuPMjXbSkvj8o4Vsej+g8mNmBU+neU6v7z5+/yWE9QGTlv1d0hH//+rf2AtwqfqGdfYgTcVG7oclKkuRMmxt885NGkWTJX8rDOULlPsKL5m4rnSZi4gURCiEfuGcYG5ZZN5DNc0DxPjIhqDrj8ipPunvIdAATjq82rNAoR+3UU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718325780; c=relaxed/simple; bh=ZxsxtwhDTqjyrGcY+zZDbr5jCj+Eo8gZ1D5oTvV7aGk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZjNlD40k+wANn2iNozcWdQFpvw0faf9kniHMJWZnotBHuhuI2FsqEtfSIA/FmYUCNBzp4HXBRt0FIm0EDqbWWM1LqmjBwG/Cd9FYo/UitkUq6MUZZTS62m8FgttGXBlVlSCwEgzSimW43Y2xe08Mz47pu1PpkvgZMZvjCHgsTp4= 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=kR+KrhHv; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ctZsseJ9; arc=none smtp.client-ip=103.168.172.148 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="kR+KrhHv"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ctZsseJ9" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 6F3621380195; Thu, 13 Jun 2024 20:42:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 13 Jun 2024 20:42: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:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1718325776; x=1718412176; bh=eyJmLqrBgL DDwAvjEwuA/NvV1Y5fbUSGVnmBpGBEbyk=; b=kR+KrhHvmDo1HwMizK7kaSU2to D/prFuSW+6nDPYPvuEy7xckCXsDOYynow81nyA530OSw6OX1ZJWYzi4H1+EUxCcL 45SgnMo+2Gn87s/Iq3IQLO/LIBMN0aCR0BQJ+7oc7aZv3Iqj5CQk05IXb3gH+MwF fhyVn57iDapmm30losZdkMr9mkELnZedPow/T+VUL1kvNLcpHFH61D71bFRiI4R0 /rFrBVa+7vOEwz5e0eLjm0KTCBhy5Is91rr/UEBnC2hJFQRqbLCwUt5JZeHnzqCz R4Ot8Cc2nUvqt+te/p8w1/yUkeZZ6JwE9wt9yj6Lap+NBP2bvQY1Wf2FH5GA== 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:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1718325776; x=1718412176; bh=eyJmLqrBgLDDwAvjEwuA/NvV1Y5f bUSGVnmBpGBEbyk=; b=ctZsseJ9+AuMhi5mC7zyMJ2N1Ouj1YUNNMfVg/O42t7i RWF7rsh/w4xRGdYSW0lMAnbhZmVxi82nnXbgZ/dYkTZq2J1B23tzEX5nZRGOU9Ds C+E5agbAEqng8jlxDPf/Eu+cycSuhwX+61yvQwzocUfElY7WK8KRpwQwBiusCPKG /OYM9vc847xAwaIcs4x38S5TrzpT0JAgvGf+37EKaJ/o47WQbOGIbanbC1q7pmYQ wzIaQYyKynLbaLXEAyRPzbQMYrWoof2JROrJzImzGL0BluYmTRtE7zeq6KVdaZl7 S6Mjjr+0VEUm9zOg6tYhFNH5mkLpKisDEdz+3DtFuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedukedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpeffvdeuleffve ekudfhteejudffgefhtedtgfeutdfgvdfgueefudehveehveekkeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 20:42:55 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH] firewire: core: record card index in tracepoints event for self ID sequence Date: Fri, 14 Jun 2024 09:42:51 +0900 Message-ID: <20240614004251.460649-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 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" This patch is for for-next branch. The selfIDComplete event occurs in the bus managed by one of 1394 OHCI controller in Linux system, while 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 4a0b273392ab..a347e2f5482c 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -140,7 +140,7 @@ static struct fw_node *build_tree(struct fw_card *card,= const u32 *sid, int self } =20 port_capacity =3D self_id_sequence_get_port_capacity(quadlet_count); - trace_self_id_sequence(self_id_sequence, quadlet_count, generation); + trace_self_id_sequence(card->index, self_id_sequence, quadlet_count, gen= eration); =20 for (port_index =3D 0; port_index < port_capacity; ++port_index) { port_status =3D self_id_sequence_get_port_status(self_id_sequence, quad= let_count, diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index 4761b700ff84..ace95d38c6ea 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -370,14 +370,16 @@ void copy_port_status(u8 *port_status, unsigned int p= ort_capacity, const u32 *se unsigned int quadlet_count); =20 TRACE_EVENT(self_id_sequence, - TP_PROTO(const u32 *self_id_sequence, unsigned int quadlet_count, unsigne= d int generation), - TP_ARGS(self_id_sequence, quadlet_count, generation), + TP_PROTO(unsigned int card_index, const u32 *self_id_sequence, unsigned i= nt quadlet_count, unsigned int generation), + TP_ARGS(card_index, self_id_sequence, quadlet_count, generation), TP_STRUCT__entry( + __field(u8, card_index) __field(u8, generation) __dynamic_array(u8, port_status, self_id_sequence_get_port_capacity(quad= let_count)) __dynamic_array(u32, self_id_sequence, quadlet_count) ), TP_fast_assign( + __entry->card_index =3D card_index; __entry->generation =3D generation; copy_port_status(__get_dynamic_array(port_status), __get_dynamic_array_l= en(port_status), self_id_sequence, quadlet_count); @@ -385,7 +387,8 @@ TRACE_EVENT(self_id_sequence, __get_dynamic_array_len(self_id_sequence)); ), TP_printk( - "generation=3D%u phy_id=3D0x%02x link_active=3D%s gap_count=3D%u scode= =3D%u contender=3D%s power_class=3D%u initiated_reset=3D%s port_status=3D%s= self_id_sequence=3D%s", + "card_index=3D%u generation=3D%u phy_id=3D0x%02x link_active=3D%s gap_co= unt=3D%u scode=3D%u contender=3D%s power_class=3D%u initiated_reset=3D%s po= rt_status=3D%s self_id_sequence=3D%s", + __entry->card_index, __entry->generation, PHY_PACKET_SELF_ID_GET_PHY_ID(__get_dynamic_array(self_id_sequence)), PHY_PACKET_SELF_ID_GET_LINK_ACTIVE(__get_dynamic_array(self_id_sequence)= ) ? "true" : "false", --=20 2.43.0