Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp136709lqs; Thu, 13 Jun 2024 06:15:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXabY8QH9LTMccxcR6p8nJz/k0pFgTpW1e+shkvo45b3vx/MhqI75r17KteVpxtr6cyvqBYotXahEUU7EmUDhjbnJ4+uE91YCEZEuV39A== X-Google-Smtp-Source: AGHT+IGXzPIfWOlei6xMdFMCg0peJsIqHH/a03yc/yZ93C/gePyJUUDJaZ59cSXbz/H0kT8doh+3 X-Received: by 2002:a50:9b4d:0:b0:57c:6f67:b17c with SMTP id 4fb4d7f45d1cf-57ca9749566mr2673215a12.7.1718284557145; Thu, 13 Jun 2024 06:15:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718284557; cv=pass; d=google.com; s=arc-20160816; b=zYRzQfm/bgEcbGqgIh37jxG7CF3kn9MjSETuxarZOxV6MwtBprulKenTVjindfVhGQ n1GHTZtQlDpscRfFg9wmM/add3INYamw1zfJUDRKVyuhWCIf993/ch4A2OmtusuppgoW euA+zXW5Nl/L9mmNZkS9zNOEtapLkuXI1tltASV0P/elfd9mBNm/hQ0O7P9ZLdvp7odo ZP97fDx2NT3Kwd4xl2AHyJ66bWuA/Cdae3lWReC+nIcrgwGkBM8SWzpxd9Oo+AHKY+CE as3d5lot37WraGcmAST9N3dzvpDJwboGZk9hIKWXQK/GoAwdR8L3zrfd9GRzZRNmPiKK zIRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=rCStrtW4Fkq1R+S/nsCfskDATiiOElcsAJ727pxmbL8=; fh=5EQyDiYgg+kua2A2AF9eJME8jasrrRA/Pgg86y+lzvY=; b=GIIvCc03GjibROPNssAw8CRYzWJQk8c0w3zuPvGXxINsFmKLUT/ySg0zrs4X82TgAk J1PNWKm2AkEAnwb+AdxyVGotfu3K0SaVXHDLSZ2FZnR4IEssOnKxwh5xZo8KrCxt283Y hkUZ8IxsDqiQyeglKblZ+av2sMqs0+l9sGAvz+vyn4BjwDPSu/P+pG+ijGBdXX1BxHpB 9k01q2mZYgaQ/SzVmDNvsQ+AQpmcEbMXQu254/8UDaYovcLOd9diiKi1osgqXaJtSiwU hm1jtX76xvrhZ1MLSVJeAhhSCXCEzyHPxeg892J70Gjb2Y2AaP2VHZEj02wVqCqzIBhU KMPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm1 header.b=hiJJOTKa; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=jAMC1sPR; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-213271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb7461f2bsi720496a12.611.2024.06.13.06.15.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm1 header.b=hiJJOTKa; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=jAMC1sPR; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-213271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ACD551F21FB7 for ; Thu, 13 Jun 2024 13:15:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0AD8145A04; Thu, 13 Jun 2024 13:14:58 +0000 (UTC) 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 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 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: 8bit 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 = short_reset ? 5 : 1; int bit = short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET; - trace_bus_reset_initiate(card->generation, short_reset); + trace_bus_reset_initiate(card->index, card->generation, short_reset); return card->driver->update_phy_reg(card, reg, 0, bit); } 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); /* We don't try hard to sort out requests of long vs. short resets. */ card->br_short = 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 != 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); 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/firewire.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, ); 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_reset), + 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 = card_index; __entry->generation = generation; __entry->short_reset = short_reset; ), TP_printk( - "generation=%u short_reset=%s", + "card_index=%u generation=%u short_reset=%s", + __entry->card_index, __entry->generation, __entry->short_reset ? "true" : "false" ) ); 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_reset), + TP_ARGS(card_index, generation, short_reset) ); 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_reset), + TP_ARGS(card_index, generation, short_reset) ); 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_reset), + TP_ARGS(card_index, generation, short_reset) ); TRACE_EVENT(bus_reset_handle, -- 2.43.0