From nobody Thu Dec 18 07:21:46 2025 Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 ADA464CE0F for ; Wed, 1 May 2024 07:33:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548794; cv=none; b=iJYOnJjyRLzrYJQQz/7oDXQwtN7VPPrpDdJMgeaEK56W2aJESVG8WNpLv/XCYgbBbJmTlI1ZwB7i/0JsGiuPZDfvU0TXDEBsqApTyM7K54/23aSdqc7Jb31PgpS1Gf7ZI1QuqvzwS7wBXtahiRUP46/1p98v5KntsSteERU7wow= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548794; c=relaxed/simple; bh=rU0h/tMyHHX9I3PZoivJSoAE32ghOrIOuF+fTIqbsm8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bsYbfpcoXXpWbQLkSlm+j3YdIH7D+dAc/KceaEpKcO0d2lZeCJG74O8FgPj/rXSMFv/qAMzlkB5RWYiPMcYByopSFcYDLJ/IoufHQZHeSKk7fEX0gnUn+ciChPHeoV2LmWHO4G5RPhAFnniaYDX+IJO0PXSEJskV+D4EuYozA+M= 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=fRZn50ID; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ehlXrLD9; arc=none smtp.client-ip=64.147.123.150 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="fRZn50ID"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ehlXrLD9" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id BE04C1C00102; Wed, 1 May 2024 03:33:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 01 May 2024 03:33:12 -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=fm3; t=1714548791; x= 1714635191; bh=vji99/5fwHT52mv+ugt6zqpbbOZSoA4Zeq3Z+QiUnIM=; b=f RZn50IDPzKCnT10evJnhaZ1XMSky9rBphcABk5RsYgpQlo9j9JOX7W2I2gCASzb6 6VGRCC52xAG8rlYVFZZeVD5Yj9PGPlfk4AsWGZPJgVFJ/MEsWM92tQQZJIPE+FD9 pCGZYJFfPtuHRjwXGuXYkEtoaJm9Zk46Ul6QDVS/zlLlZZT1ajepl/7pzFlaeIbM MYQ3Pf43Oz3DDwUBRNmVDBgcjSM+aaac53wtQAsS6gSl+aVf18e+y4Gq6fv2eVix ZTY+riFpGs1ged0o9qW6/aplaDb+lLwFin1JSpfWIyErYoGdciafFd1VwH3xdhhF x8R0lzq8YrwOR3eilHAkg== 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=fm3; t=1714548791; x= 1714635191; bh=vji99/5fwHT52mv+ugt6zqpbbOZSoA4Zeq3Z+QiUnIM=; b=e hlXrLD9wSymNy2xdSFHwg+G/RbCberV/M4dA7UbcgUbloinuoN8CI6puTJ1DjESk tzEaC0CX1MPdDxbF/a+wfnMRPs9DhZR7cFulIzFgTwnK1SAZIKPAIJXOy8DlH/Da KMCwuvv5/AwiaWgdGHC7Z/zuyBhYEBcgXUOzwXSOww+Vyw/TkGwMf4cxesDI8r5W 6wB5e95ox/a+YkEmGKui6gCE+GIDpV6B5kIqFAkGLYQaBmEM6afMxBaZ0pAa5+kg Fu8pWUzIEoqAltr7NE2vZYZ1wUsityrcOa2DUCE7yGyqW0J1g+zYfXjeGvUnMf9Y RpNm1QAH2Xc+Y8U6n6oZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 May 2024 03:33:10 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH 1/5] firewire: ohci: add bus-reset event for initial set of handled irq Date: Wed, 1 May 2024 16:32:34 +0900 Message-ID: <20240501073238.72769-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501073238.72769-1-o-takashi@sakamocchi.jp> References: <20240501073238.72769-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" In the former commits, the spurious interrupt events are suppressed as possible, by unset bus-reset event from the set of handled irq. The change was written with the less-intrusive style, thus it firstly works at the second time to handle the event. But it is slightly inconvenient. This commit adds the event for the initial set of irq to handle. As a result, the event can be handled even if it is the first time. The change has a benefit that the OHCI_PARAM_DEBUG_BUSRESETS bit in debug module parameter is always effective. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 6116153f0ce6..d69629d8ba71 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -394,7 +394,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default =3D 0" #define OHCI_PARAM_DEBUG_AT_AR 1 #define OHCI_PARAM_DEBUG_SELFIDS 2 #define OHCI_PARAM_DEBUG_IRQS 4 -#define OHCI_PARAM_DEBUG_BUSRESETS 8 /* only effective before chip init */ +#define OHCI_PARAM_DEBUG_BUSRESETS 8 =20 static int param_debug; module_param_named(debug, param_debug, int, 0644); @@ -2062,8 +2062,7 @@ static void bus_reset_work(struct work_struct *work) =20 ohci->generation =3D generation; reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); - if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) - reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); + reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); =20 if (ohci->quirks & QUIRK_RESET_PACKET) ohci->request_generation =3D generation; @@ -2135,6 +2134,7 @@ static irqreturn_t irq_handler(int irq, void *data) reg_write(ohci, OHCI1394_IntEventClear, event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr)); log_irqs(ohci, event); + // The flag is masked again at bus_reset_work() scheduled by selfID event. if (event & OHCI1394_busReset) reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); =20 @@ -2474,9 +2474,8 @@ static int ohci_enable(struct fw_card *card, OHCI1394_cycleInconsistent | OHCI1394_unrecoverableError | OHCI1394_cycleTooLong | - OHCI1394_masterIntEnable; - if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) - irqs |=3D OHCI1394_busReset; + OHCI1394_masterIntEnable | + OHCI1394_busReset; reg_write(ohci, OHCI1394_IntMaskSet, irqs); =20 reg_write(ohci, OHCI1394_HCControlSet, --=20 2.43.0 From nobody Thu Dec 18 07:21:46 2025 Received: from wfhigh1-smtp.messagingengine.com (wfhigh1-smtp.messagingengine.com [64.147.123.152]) (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 12E394D11D for ; Wed, 1 May 2024 07:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548796; cv=none; b=Q/ugrIJDPvQnYV27ILP9OCkktGO0aS9Tg/vsvT8QnEARL0SaT/ET7LCvfBrhpM6rPW5RSOD/Zy+3BN03mj9CM/2mREZWOIhTWF2w6sT1EZBQB5Ow6z234xAcax3SLyT0vSGZXLt8aySIULeLBFcB4EfQFvPl9kJYZPOs8spXzng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548796; c=relaxed/simple; bh=30aRBMC3W7x8Y6esE4/TZUqzERrGNKxNM9Q2Xe3E4EU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gQmfIWQJnxwbBc/vYtPY+ov7VOmcgK4BQ3WSEX6qTb//I4gfQZFY/SXAHHCGLOTnEZPz4teVUTA8V61Ik5H8rniTSdgF8DlsaGb5a83QnTEclkgvkzy+4z6WP65gQOsYbCxXxhZ29rIKjIahf7J0v3rRI4zIZzZclieHq3uSb5M= 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=USG6fP7D; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VMgGHrYb; arc=none smtp.client-ip=64.147.123.152 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="USG6fP7D"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VMgGHrYb" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id 0E4CA180010C; Wed, 1 May 2024 03:33:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 01 May 2024 03:33:14 -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=fm3; t=1714548793; x= 1714635193; bh=HFcRJRe/Y0MyNFmax3pmYevS0hyOD26+e/Eh8+mPM+k=; b=U SG6fP7DGEzjg3GM5cQMBmQl7icOaF4Kr8vqAGctrRZ19aYtUbS6FIEdMAEEateyK zs4cGfFotsgz2ZTjFJbIPuaxHXZ6exdS2g1bg5DslJ3MwEcNWpYxN4xSKe26G03O T6z3Mmx4Qw7B+TXozQBQlfruoEpOPybze1u2wasKJdCAuHUnqQc5YR42KNUZ/gi9 U62glcatF9xDpwazXZwlN8StXZzVoeIFXGRe/Tk02NKxu43ctRpu1MwCMAhtHst/ BsY3LeIf5+HlATZdCUN45S3Chl3/5W9acTULfTw4kkgyBDzoy9FNSBGCHMXp9h7E /PbWXR0MvJDee1hNJkPEg== 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=fm3; t=1714548793; x= 1714635193; bh=HFcRJRe/Y0MyNFmax3pmYevS0hyOD26+e/Eh8+mPM+k=; b=V MgGHrYbm3A2wcOjot7M4DWw9ZQjzU0MsgM4ArYUGqUOjEtTmv9QmSheLIZXtOaGi HUeQ1qjx+pOLlPHRIKWE90YjdgouviGs+9HkcijwRfCRviydTs5bJ4fV//VuZecb xyF4qf+IcaVhfmfZTc35xdIKhqzjI/+ovyV/O5zVuESCedgiXSySxRjDwslwCsuM YSGRA3LLpc1uWV1++dIRTE+Ze9ASExYzryprWz1Sn6+PEAWudIkGDc8wiCpIUKjq 7Ux1VlGTpQL57yB68HBRpfMv8U758O16iucTEmHlBoqPp9RDHk6rpB7eMueRG8ZR 2w9Ewx5xATyYIGJXnY4aQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 May 2024 03:33:12 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH 2/5] firewire: ohci: obsolete OHCI_PARAM_DEBUG_BUSRESETS from debug module parameter Date: Wed, 1 May 2024 16:32:35 +0900 Message-ID: <20240501073238.72769-3-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501073238.72769-1-o-takashi@sakamocchi.jp> References: <20240501073238.72769-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 OHCI_PARAM_DEBUG_BUSRESETS bit of debug module parameter was added at a commit a007bb857e0b ("firewire: fw-ohci: conditionally log busReset interrupts"). At the former commit, the bit becomes less meaningful, just to skip logging. This commit obsoletes it. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index d69629d8ba71..93dca3216e45 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -394,7 +394,6 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default =3D 0" #define OHCI_PARAM_DEBUG_AT_AR 1 #define OHCI_PARAM_DEBUG_SELFIDS 2 #define OHCI_PARAM_DEBUG_IRQS 4 -#define OHCI_PARAM_DEBUG_BUSRESETS 8 =20 static int param_debug; module_param_named(debug, param_debug, int, 0644); @@ -402,7 +401,6 @@ MODULE_PARM_DESC(debug, "Verbose logging (default =3D 0" ", AT/AR events =3D " __stringify(OHCI_PARAM_DEBUG_AT_AR) ", self-IDs =3D " __stringify(OHCI_PARAM_DEBUG_SELFIDS) ", IRQs =3D " __stringify(OHCI_PARAM_DEBUG_IRQS) - ", busReset events =3D " __stringify(OHCI_PARAM_DEBUG_BUSRESETS) ", or a combination, or all =3D -1)"); =20 static bool param_remote_dma; @@ -411,12 +409,7 @@ MODULE_PARM_DESC(remote_dma, "Enable unfiltered remote= DMA (default =3D N)"); =20 static void log_irqs(struct fw_ohci *ohci, u32 evt) { - if (likely(!(param_debug & - (OHCI_PARAM_DEBUG_IRQS | OHCI_PARAM_DEBUG_BUSRESETS)))) - return; - - if (!(param_debug & OHCI_PARAM_DEBUG_IRQS) && - !(evt & OHCI1394_busReset)) + if (likely(!(param_debug & OHCI_PARAM_DEBUG_IRQS))) return; =20 ohci_notice(ohci, "IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt, --=20 2.43.0 From nobody Thu Dec 18 07:21:46 2025 Received: from wfhigh1-smtp.messagingengine.com (wfhigh1-smtp.messagingengine.com [64.147.123.152]) (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 40B0B4DA11 for ; Wed, 1 May 2024 07:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548798; cv=none; b=kNo6AmoWsgmA0jOXdxIRTEjLpbZTZblTDYvqSzAELSMF7PiSrKLJgb39kW3CwXk0/+AjRpo9N+rgi6/83KyCsCyDuuDQAy7T2iCGGFRTCR1ONPc1Du59iwyFBAbzo1i0ogMBTLX7qPXeX1QLUO7g7aRY8EGjIQSozT4it04FmDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548798; c=relaxed/simple; bh=ctq6B38b/c7LjB8JdPauG3pA68DVu0dZQ8/1LoUMRXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gxord4kEGmGgFtw8eiYaOYNLoIhBZ5CfN4vICFi1MxS7070jDQcveYy55BYa6pyvYXFeboHFwA2dUrJO0iC24gScMwl1ZIeE51ijngv4n3kqlJFgrOas2Rg4rZrNd1f59gZnYUSnlxnz+n6On7orkOR3xwBhQL4pg31q7UE19s8= 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=V0XNnrNS; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=UKRtw/Ja; arc=none smtp.client-ip=64.147.123.152 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="V0XNnrNS"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="UKRtw/Ja" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 415831800113; Wed, 1 May 2024 03:33:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 01 May 2024 03:33:16 -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=fm3; t=1714548795; x= 1714635195; bh=3et/NwBVInRkKPuHxHe5wh8LNXDVK91DOcQrlzNNZd0=; b=V 0XNnrNSwzWxyo8m1w4sguAKtA5S/Bm74mH4LsLVw9dlXjJOeYINWNJhBM6h4t+V2 cUAFkePakBWZpWALgN9IHsKtZ1quW8vyLZHZ9QZAMXgSvVWWGLT+btoYaTNz0OkT UExdQHVStUdUuT5Ikt4YVeY3vdAubONyK7S4sUivglNc45LaRg0yeqs4P0AE05KW JK7P40EpJPgr7lWKE7/Ybfr4lwizPPz30YeB4ryWwGEoWB7OwBlN2MeP1Utspf1a Wq1C3/Nei9o6dnhgL3o5CN2z8UakiEC0jRCrbAD9ebaF/58xY+gRrK85x7D0ueoE HCWi03EQsf/On8p0x7w2A== 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=fm3; t=1714548795; x= 1714635195; bh=3et/NwBVInRkKPuHxHe5wh8LNXDVK91DOcQrlzNNZd0=; b=U KRtw/JaauZI7UP43GUzBAYaLO47enOH4bxivCUQaeuVOr2JrPlBbHnWbLu76bHQ3 kwTxLldZRBGQwhxTl4hR1hIP2AzpcFzoozaCUpWaFYZy7aomjkm1HE+ZcYOY4Wa/ hr1cQky3AtvNs7gkusb1Pclatv0H9TDkaRvCicYeJdFdexSu3JrmhMWgXqn15k3D bS9pkC5hKADzLwAbmhQiCjc1Ru4wfVwnm4Dd0E5egaQi1E0ToaW/dzEcnGXWhVdK AmBiNu8LJy783M2a2FI/X4Yim1lqNi2Pw+F7iKyebul27KcQoE15Sp7tdAvB3rfI 4H/c8UzhobfSgyq1rPYzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 May 2024 03:33:14 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH 3/5] firewire: core: add tracepoints events for initiating bus reset Date: Wed, 1 May 2024 16:32:36 +0900 Message-ID: <20240501073238.72769-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501073238.72769-1-o-takashi@sakamocchi.jp> References: <20240501073238.72769-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" At a commit 673249124304 ("firewire: core: option to log bus reset initiation"), some kernel log messages were added to trace initiation of bus reset. The kernel log messages are really helpful, while nowadays it is not preferable just for debugging purpose. For the purpose, Linux kernel tracepoints is more preferable. This commit adds some alternative tracepoints events. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-card.c | 7 +++++++ include/trace/events/firewire.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index dac1b0fc7a42..5d43acf45a7d 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -23,6 +23,7 @@ #include =20 #include "core.h" +#include =20 #define define_fw_printk_level(func, kern_level) \ void func(const struct fw_card *card, const char *fmt, ...) \ @@ -221,6 +222,8 @@ static int reset_bus(struct fw_card *card, bool short_r= eset) 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); + if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) fw_notice(card, "initiating %s bus reset\n", short_reset ? "short" : "long"); @@ -230,6 +233,8 @@ static int reset_bus(struct fw_card *card, bool short_r= eset) =20 void fw_schedule_bus_reset(struct fw_card *card, bool delayed, bool short_= reset) { + trace_bus_reset_schedule(card->generation, short_reset); + if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) fw_notice(card, "scheduling %s bus reset\n", short_reset ? "short" : "long"); @@ -252,6 +257,8 @@ 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); + if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) fw_notice(card, "delaying bus reset\n"); if (!queue_delayed_work(fw_workqueue, &card->br_work, 2 * HZ)) diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index db49b9828bd1..92bcbe69bb42 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -284,6 +284,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_STRUCT__entry( + __field(u8, generation) + __field(bool, short_reset) + ), + TP_fast_assign( + __entry->generation =3D generation; + __entry->short_reset =3D short_reset; + ), + TP_printk( + "generation=3D%u short_reset=3D%s", + __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) +); + +DEFINE_EVENT(bus_reset_arrange_template, bus_reset_schedule, + TP_PROTO(unsigned int generation, bool short_reset), + TP_ARGS(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) +); + #endif // _FIREWIRE_TRACE_EVENT_H =20 #include --=20 2.43.0 From nobody Thu Dec 18 07:21:46 2025 Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 8D8DD4F201 for ; Wed, 1 May 2024 07:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548801; cv=none; b=FBG06B8DJPus9E4sJ6e0yI328UEItUSyihGJXaPdN0AD7urLCouq29jxkhUoMHNli4vbCZNzt6kmhvRygBX4YisfL/bNBOIwaZhrINor3/VkUBvEA6bKoUQV3mpNCHOsUsGIsPkaH3HYADmvG9PH91p22vK6qEwDAE29qoGg58g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548801; c=relaxed/simple; bh=bipW+sFTPR0KNhCgWOsfzV4atAEryOnMGBM6QNDGdgk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D3g8wlnzCuOk9HS68yAnL8lUb6RD/VO+DT0tT9qKV36KTS6AVIOouENIBR7h95Gd7e1wYDDjwOYcQVdYyAZfdwpa6lWjKqzeOoRqOCQQFcbHzOPvo8bJCD7z6LXd4jCvxlpafmFX1W33spqG0k8BQDS8KPLX/I+iMyOG4KUKp5M= 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=jJjUpBCv; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cPo1tp9u; arc=none smtp.client-ip=64.147.123.150 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="jJjUpBCv"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cPo1tp9u" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 84FB31C0010F; Wed, 1 May 2024 03:33:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 01 May 2024 03:33:18 -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=fm3; t=1714548798; x= 1714635198; bh=HgUZJoRk+wcwO/h9C2rYbGduJQggRI/00GIyShHGGpA=; b=j JjUpBCvGeTlsxIUw5HQKZbOWIrlFM2iP6G2ZepoUYd5Gt29KSM4/CJZFSYmIRzRz +u6eVG0dXM67eyp3BnKoGX+f8w1oo9JFjWqZS1QkawrgiHDCDouq68o2bEOfv2t9 mo+3HWO20Hasist7d1c4w8K1S3Q8ZgHIKTJRO/+XBx3NlKPVh0Ay0YKb4TAJhl28 3lkzeottPpmEJJpJiJwclzAzdIMGRdZ4Lu3epiMetomIY1fUlziieHHah1D+PVUS Psdn/UpY5/xLlUQWILauoEVLBHSXTokPw4h41rXVf8//XR3nxMXXHJRDjqQCVxdQ jIiyczxX/kBM/2TYKYpww== 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=fm3; t=1714548798; x= 1714635198; bh=HgUZJoRk+wcwO/h9C2rYbGduJQggRI/00GIyShHGGpA=; b=c Po1tp9u76EPuscnqfGXwz5UmsjcEwPZhrpc67yjjicwV7mlTve3sYmyksanIdwn+ oeaKJGjEuYpWT020fQ14IBoIoy++syarHuuCU1XqemzTSWnvimgVIozZSkvPpdJw AP+B0V80+g74fWqraAPL5J7nfzwJHJEgpyLYiMBQtghPf3CcbFI3zPt6ScONqaxx +T5xjWKvDUiJ9prJX5EFKuv6PDUQqcVXIh9fUTMFHUHDC4lgOSPokiWjNp98u0b2 Afw7JfXF1R7gEjmNZtEr+RX0uOh8yNFKBsXpMAvqLl+jNuQt7JRtIaesC3OqwIlJ m5liOmWq8A7RIvnmWGI8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 May 2024 03:33:16 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH 4/5] Revert "firewire: core: option to log bus reset initiation" Date: Wed, 1 May 2024 16:32:37 +0900 Message-ID: <20240501073238.72769-5-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501073238.72769-1-o-takashi@sakamocchi.jp> References: <20240501073238.72769-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" This reverts commit 6732491243045f5a7e1995b4be5f3c964b579ebd. The former commit adds some alternative tracepoints events to replace the reverted kernel log messages. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-card.c | 10 ---------- drivers/firewire/core-transaction.c | 7 ------- drivers/firewire/core.h | 4 ---- 3 files changed, 21 deletions(-) diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 5d43acf45a7d..127d87e3a153 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -224,10 +224,6 @@ static int reset_bus(struct fw_card *card, bool short_= reset) =20 trace_bus_reset_initiate(card->generation, short_reset); =20 - if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) - fw_notice(card, "initiating %s bus reset\n", - short_reset ? "short" : "long"); - return card->driver->update_phy_reg(card, reg, 0, bit); } =20 @@ -235,10 +231,6 @@ void fw_schedule_bus_reset(struct fw_card *card, bool = delayed, bool short_reset) { trace_bus_reset_schedule(card->generation, short_reset); =20 - if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) - fw_notice(card, "scheduling %s bus reset\n", - short_reset ? "short" : "long"); - /* We don't try hard to sort out requests of long vs. short resets. */ card->br_short =3D short_reset; =20 @@ -259,8 +251,6 @@ static void br_work(struct work_struct *work) time_before64(get_jiffies_64(), card->reset_jiffies + 2 * HZ)) { trace_bus_reset_postpone(card->generation, card->br_short); =20 - if (unlikely(fw_core_param_debug & FW_CORE_PARAM_DEBUG_BUSRESETS)) - fw_notice(card, "delaying bus reset\n"); if (!queue_delayed_work(fw_workqueue, &card->br_work, 2 * HZ)) fw_card_put(card); return; diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-tr= ansaction.c index d3eefbf23663..571fdff65c2b 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -1390,12 +1390,5 @@ static void __exit fw_core_cleanup(void) idr_destroy(&fw_device_idr); } =20 -int fw_core_param_debug; -module_param_named(debug, fw_core_param_debug, int, 0644); -MODULE_PARM_DESC(debug, "Verbose logging (default =3D 0" - ", bus resets =3D " __stringify(FW_CORE_PARAM_DEBUG_BUSRESETS) - ")"); - - module_init(fw_core_init); module_exit(fw_core_cleanup); diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h index 5097c7a270b4..7c36d2628e37 100644 --- a/drivers/firewire/core.h +++ b/drivers/firewire/core.h @@ -245,10 +245,6 @@ static inline bool tcode_is_link_internal(unsigned int= tcode) /* OHCI-1394's default upper bound for physical DMA: 4 GB */ #define FW_MAX_PHYSICAL_RANGE (1ULL << 32) =20 -#define FW_CORE_PARAM_DEBUG_BUSRESETS 1 - -extern int fw_core_param_debug; - void fw_core_handle_request(struct fw_card *card, struct fw_packet *reques= t); void fw_core_handle_response(struct fw_card *card, struct fw_packet *packe= t); int fw_get_response_length(struct fw_request *request); --=20 2.43.0 From nobody Thu Dec 18 07:21:46 2025 Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 A77724F897 for ; Wed, 1 May 2024 07:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548803; cv=none; b=n2BpVAlXtyChpP9RZlnir/0gnXKu2y8Mf+1Qj9Rtd+ypyvtcSYEq7fJ6BJjMS4uVyrVXUAjmKtlbTHmMevBLPUgvbYqGX4+KFpYuz9S3+YySv4tjkT60Jufgi5WZ94H9RCse6hz+AYxTrGDAFmiiqAahHSeEuWeSlJWaGUgw2Pw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714548803; c=relaxed/simple; bh=L/nIJ0NVg0scqGPi6YtPzjqXDmqeoi/bV5TK/tjXfLQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tjrjt9FYqzF7GHKkRurAz5K3RHWcJ4y3KC5ufjfI0Fj05ytsu666uE9N21Ilj9fYmN5oiFR8pAEXe9qezMbOK43NPWml7gCdpkiDmrN5MVpqmCUymETKs8n4tpf3wOyRGR8h64v4EkpTISuBecJvDPrp8UWt9/3HhUunC0ZHVi8= 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=Wde8Sqka; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=QZVlLWT3; arc=none smtp.client-ip=64.147.123.150 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="Wde8Sqka"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="QZVlLWT3" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.west.internal (Postfix) with ESMTP id CACED1C000F0; Wed, 1 May 2024 03:33:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 01 May 2024 03:33:21 -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=fm3; t=1714548800; x= 1714635200; bh=UXhYUUuJV5tMvW12H0m4FPip2YTr/sl2Xn2dSZa5qW8=; b=W de8Sqkafz1D2bcq4aia9vDn7yU0eNXX/hQjOnVxmu91+kCed+Z6edaikvFfcv7U4 enzsgP+8Em+EJ16x0AET+sJAE+/B/EZXZA/39xlEznBsQ2Wfy3ZV/6GVDqx1Vm4d CcPX/wf6TMyk/KqZHz+F0lTIRwoqYEFEY+TzQrjP6gCbpHQMpnDPYUfwV6d3Oca4 mU04Kzu6fQKH54L8bFWbUDOGpdG+8Mx8qiAYGW3+dYtxno+B+zWRnG+I7ijYDifQ X2bON+OncH6ILVKcLB9gIT9sTp5m9LPuRSOydEZFs+gMeZcXeCMXsfaQh9xqbQ5s 4kholFG914roWyPx6BBYw== 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=fm3; t=1714548800; x= 1714635200; bh=UXhYUUuJV5tMvW12H0m4FPip2YTr/sl2Xn2dSZa5qW8=; b=Q ZVlLWT3oRZfRecIvSrMN9h3fc3JL2J84d6lkP6eceMVYpaz1GuiEvkMzditprYn+ sC33K5+v0KbyYz8twHUH2zUdSJVltIKq74lMHjjsiBiRP6UR11xAaxu2aAPF6HcT Y4vgKUf7HkeIKljGInNhm7SnmQwpXwLyof0ijiccYynBFHF+7vJKGdcjVZVmlR49 gAk+RTd2Kf1GBD+ZX3UjgbeXHpfP3S7ImpSqbs7Q15T2NbEiRX0S4fFRSuWaxI+C +HJMbofd7kPuz2F8TOT+oL+8sNdyPco0uLwq7H/eQftlx151GV8iaClO7JBrDsBk aaMULPcsk8Ga2dg7Dgbfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 May 2024 03:33:19 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH 5/5] firewire: core: add tracepoint event for handling bus reset Date: Wed, 1 May 2024 16:32:38 +0900 Message-ID: <20240501073238.72769-6-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501073238.72769-1-o-takashi@sakamocchi.jp> References: <20240501073238.72769-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 core function expects hardware drivers to call fw_core_handle_bus_reset() when changing bus topology. The 1394 OHCI driver calls it when handling selfID event as a result of any bus-reset. This commit adds a tracepoints event for it. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-topology.c | 3 +++ include/trace/events/firewire.h | 28 +++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topol= ogy.c index f40c81534381..837cc44d8d9f 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -20,6 +20,7 @@ #include =20 #include "core.h" +#include =20 #define SELF_ID_PHY_ID(q) (((q) >> 24) & 0x3f) #define SELF_ID_EXTENDED(q) (((q) >> 23) & 0x01) @@ -507,6 +508,8 @@ 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); + spin_lock_irqsave(&card->lock, flags); =20 /* diff --git a/include/trace/events/firewire.h b/include/trace/events/firewir= e.h index 92bcbe69bb42..4163959be57a 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -204,7 +204,6 @@ DEFINE_EVENT(async_outbound_complete_template, async_re= sponse_outbound_complete, #undef ASYNC_HEADER_GET_SOURCE #undef ASYNC_HEADER_GET_OFFSET #undef ASYNC_HEADER_GET_RCODE -#undef QUADLET_SIZE =20 TRACE_EVENT(async_phy_outbound_initiate, TP_PROTO(u64 packet, unsigned int generation, u32 first_quadlet, u32 seco= nd_quadlet), @@ -317,6 +316,33 @@ DEFINE_EVENT(bus_reset_arrange_template, bus_reset_pos= tpone, TP_ARGS(generation, short_reset) ); =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_STRUCT__entry( + __field(u8, generation) + __field(u8, node_id) + __field(bool, bm_abdicate) + __dynamic_array(u32, self_ids, self_id_count) + ), + TP_fast_assign( + __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", + __entry->generation, + __entry->node_id, + __entry->bm_abdicate ? "true" : "false", + __print_array(__get_dynamic_array(self_ids), + __get_dynamic_array_len(self_ids) / QUADLET_SIZE, QUADLET_SIZE) + ) +); + +#undef QUADLET_SIZE + #endif // _FIREWIRE_TRACE_EVENT_H =20 #include --=20 2.43.0