From nobody Fri Oct 3 21:56:44 2025 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-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 DCEAA1F03D5 for ; Sat, 23 Aug 2025 03:10:01 +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=1755918604; cv=none; b=TSI3ISi6cPU8RoCM/1gwCwXgIE984XMVjZBh7PsQ9EYoGKeFcnJuZ1AIi3PbYMajayfjoYNT/EgDYRz7a6KQ1f68J8NEO6unM+OfV5XO+a8QoEFqZoi0KRwosBxTX+u0NTPViF11J/XB1JCvwm96sBdRDtQjVquH7k4NUzv9hKk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755918604; c=relaxed/simple; bh=86N9WEt2GNRJbOmsJBgqLPrBWgteO9boS4qD/cglaZA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E53PyQtD5FL5UKKLbytD54OlQQxwJuDpVuNFgqrhR8LdOV+ygT5FISh7sskpLcsQbWsFE1bmXJJI1IeSVBVEYdYrFJPCbW+u5cXz5zCZZlT6d/pCSMTeSYohXPg/hDsMk/NUqrWYvnFRENRpPMwS99KYSWO3U/CGrf2hjXvp+Oc= 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=EOKhf6UU; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=XGLkJikB; 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="EOKhf6UU"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XGLkJikB" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id F146B14000BB; Fri, 22 Aug 2025 23:10:00 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Fri, 22 Aug 2025 23:10:00 -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=1755918600; x= 1756005000; bh=UyCmahf95MEvBkiDdBnddD8J0Aqng1u+S79mqWwTmJo=; b=E OKhf6UUL+49WWz0n/HAaw/a5Cm2eNGmh10JmFNgvzwqzXNw916suuHVpJXX5FGYT XQs7Evw9+EoSXc5nfdNSgMZYeUKG/Es/iR0wfFtCNCb64vYzz9LjVs51JSFYKY00 /vaJp3QQIkL97bgdRYM6FT/OalC+aXZSbXVlxnqNL1K6y7reF2eK/GFhsNE2zx81 tGCj4GziOr469Sf3+D5yEP6oxT3JDv8rHziEM7/ytmBx2/sW3Zm8YADnneaez0ov UbbJZiX7P2BZOg++I0hth6U5E6GyXON3m+LAhEDE4vMpuABioHo976L5YfSZZiom KeRsWTUX5SMUX0IR6FNew== 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-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755918600; x=1756005000; bh=U yCmahf95MEvBkiDdBnddD8J0Aqng1u+S79mqWwTmJo=; b=XGLkJikBJp+9B/rmv SD/kShU2tZGxIaLLx1nIIpIiCwk4Pv7gRzcMhHTwsVgaLcf9EmPfqO9WSBO8NNbN Qj/h+35zrqTstEOhgYf8cCwUidJNkQ8qDOIhxbutwrwHxpIMBfKS6UacQa+ZeOQD m6Nq3F1hMymqfAFK8EYzH7FazEBiSUPHlRDFNnHG/8oZqwCXDWe0BPGD88eVtfcj YUWsQH2PJY7Q/z6OKTJL696W8qruOvlwvMPdyKk5yji92Vw1NFgshYHndKoWk21n Vjm89U6h3lZMDgr9PHWrYIK5X+FqdwFwA+AyQmaWHFFMEDOrg5WNZw7uzaFp8kUw 1i7ww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduieehhedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgjeeuvd fguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhppdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehlihhnuhigudefleegqdguvghvvghlsehlihhsthhsrdhsohhurh gtvghfohhrghgvrdhnvghtpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgv rhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Aug 2025 23:09:59 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] firewire: ohci: move self_id_complete tracepoint after validating register Date: Sat, 23 Aug 2025 12:09:52 +0900 Message-ID: <20250823030954.268412-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250823030954.268412-1-o-takashi@sakamocchi.jp> References: <20250823030954.268412-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 value of OHCI1394_SelfIDCount register includes an error-indicating bit. It is safer to place the tracepoint probe after validating the register value. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index c8c5d598e3c8..b3a187e4cba7 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -1863,6 +1863,9 @@ static void bus_reset_work(struct work_struct *work) ohci_notice(ohci, "self ID receive error\n"); return; } + + trace_self_id_complete(ohci->card.index, reg, ohci->self_id, has_be_heade= r_quirk(ohci)); + /* * The count in the SelfIDCount register is the number of * bytes in the self ID receive buffer. Since we also receive @@ -2024,15 +2027,8 @@ static irqreturn_t irq_handler(int irq, void *data) if (event & OHCI1394_busReset) reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); =20 - if (event & OHCI1394_selfIDComplete) { - if (trace_self_id_complete_enabled()) { - u32 reg =3D reg_read(ohci, OHCI1394_SelfIDCount); - - trace_self_id_complete(ohci->card.index, reg, ohci->self_id, - has_be_header_quirk(ohci)); - } + if (event & OHCI1394_selfIDComplete) queue_work(selfid_workqueue, &ohci->bus_reset_work); - } =20 if (event & OHCI1394_RQPkt) queue_work(ohci->card.async_wq, &ohci->ar_request_ctx.work); --=20 2.48.1 From nobody Fri Oct 3 21:56:44 2025 Received: from fout-a6-smtp.messagingengine.com (fout-a6-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 A9B6C1FCFE7 for ; Sat, 23 Aug 2025 03:10:03 +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=1755918606; cv=none; b=UI4HxVsJ6TynVxC1prY22BCUmQe9Zjl3rtQ3tmQzxcMUyFYL6rL+iDaYnIyccrpW7mpPgmOCAtvYPqv6RLYtZ9cLrWHWOqTP5SxVe3n9tTat9DPrZwP08EllblnGH35Aql2+rvLQskokpWPhzIpf3Nk7iDDCVeb5QoquQiJD5Ss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755918606; c=relaxed/simple; bh=hsyVRFXO43FN7lt3DD50Me5c+/yHkykXvtmWOXEYLaA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nXjRBf4WLKlH4EWid6Bj2WFEAv0ToQoHM5CJyyOHbrdes6qHRSeevfdqXQgEvoL5Mwj97o+GPzVqw5zUgsR+yA4PTuH3TSFSdd/nci6H9KAWAAkbGN7jmCTt8SoIVDhykTGnM31pVZ1JX5edd0YAhI54jYqNI0X81XVgsv0V6sc= 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=V8cqdpZf; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=c96e0ks0; 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="V8cqdpZf"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="c96e0ks0" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id C48E7EC0104; Fri, 22 Aug 2025 23:10:02 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Fri, 22 Aug 2025 23:10:02 -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=1755918602; x= 1756005002; bh=3crpEdB7OcyPvu5Wrn8qtd8hvfuYA/uGdo8MouC/JZI=; b=V 8cqdpZfN5BFwwt3CO8v4HUTUh5AKnVEdUEelf2rbHTA4ljxt3YWZI17RPO4o1Upb JLOkUTGTltALiowCMH+e+RzAHVmp/xJGE4vrjn7LmFXOrMtjbbFwBR+SMRE5eyud 0o10CmUcV7/rRidKqYJTfEnKala7uoZ5e+TWxGJ8i6B5Cy1v3jQRQF4J0GkGuhOJ XUBJbwsbhDGQYAzYEYbG+nphhUiBixI3G+ioBxPy6Sy5+pJ04jVazql9MIeHa9hx KqCc8gzFnsHVTK4L5rQwKScX+s+4HGKRIahy4QFX0ajTrX4+Yd0ZVqhXuesvPk0G 8cH7BODRc4bDHkuTnYTGw== 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-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755918602; x=1756005002; bh=3 crpEdB7OcyPvu5Wrn8qtd8hvfuYA/uGdo8MouC/JZI=; b=c96e0ks0hPCjacem9 D/hoDkY93TDZSB+86o2oJnjewGBV7dcKwelWYUGa58et8llhBmEsoKkzUGENWQpd F3aKozywrThfmi0MiSGsVV8ptwUjIeUgzUAM+r/sF/xPlTQxAr3NYPPjdPJsKlga S5uFXuS6a62myiqDJFyY+D5vdMZ12spXNbdC9V6k4uzNmWpA+IhjZHpKMhFnAqAt uss8aKlV69Y4gDnWAuDyffcrufcuLrd8nl+E8Ps/uR1BEi1UW1z77TiRvOJjPVLq hErR5hVBGpESLSSsp+AR0IKtLm0iAfF9gqUSWe9RUlWjzGvBO1VDV2c89yPaInUa 9TkDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduieehhedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgjeeuvd fguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhppdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehlihhnuhigudefleegqdguvghvvghlsehlihhsthhsrdhsohhurh gtvghfohhrghgvrdhnvghtpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgv rhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Aug 2025 23:10:01 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/3] firewire: ohci: use threaded IRQ handler to handle SelfIDComplete event Date: Sat, 23 Aug 2025 12:09:53 +0900 Message-ID: <20250823030954.268412-3-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250823030954.268412-1-o-takashi@sakamocchi.jp> References: <20250823030954.268412-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 first step maintaining the bus topology is to handle SelfIDComplete event. This event occurs after initiating bus reset when 1394 OHCI link layer is enabled, or when the bus topology changes (e.g. when a device is added). Because enumeration of the selfID sequence can take some time, it should be processed in a bottom half. Currently, this is done in a module-local workqueue with the WQ_MEM_RECLAIM flag, to allow invocation during memory reclaim paths. A threaded IRQ handler is a preferable alternative, as it eliminates the need to manage workqueue attributes manually. Although SelfIDComplete events are not so frequent in normal usage, handling them correctly is critical for proper bus topology management. This commit switches SelfIDComplete handling to a threaded IRQ handler. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index b3a187e4cba7..5b16286280e0 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -760,7 +760,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx,= __le32 *buffer) * * Alas some chips sometimes emit bus reset packets with a * wrong generation. We set the correct generation for these - * at a slightly incorrect time (in bus_reset_work). + * at a slightly incorrect time (in handle_selfid_complete_event). */ if (evt =3D=3D OHCI1394_evt_bus_reset) { if (!(ohci->quirks & QUIRK_RESET_PACKET)) @@ -1830,9 +1830,9 @@ static int find_and_insert_self_id(struct fw_ohci *oh= ci, int self_id_count) return self_id_count; } =20 -static void bus_reset_work(struct work_struct *work) +static irqreturn_t handle_selfid_complete_event(int irq, void *data) { - struct fw_ohci *ohci =3D from_work(ohci, work, bus_reset_work); + struct fw_ohci *ohci =3D data; int self_id_count, generation, new_generation, i, j; u32 reg, quadlet; void *free_rom =3D NULL; @@ -1843,11 +1843,11 @@ static void bus_reset_work(struct work_struct *work) if (!(reg & OHCI1394_NodeID_idValid)) { ohci_notice(ohci, "node ID not valid, new bus reset in progress\n"); - return; + goto end; } if ((reg & OHCI1394_NodeID_nodeNumber) =3D=3D 63) { ohci_notice(ohci, "malconfigured bus\n"); - return; + goto end; } ohci->node_id =3D reg & (OHCI1394_NodeID_busNumber | OHCI1394_NodeID_nodeNumber); @@ -1861,7 +1861,7 @@ static void bus_reset_work(struct work_struct *work) reg =3D reg_read(ohci, OHCI1394_SelfIDCount); if (ohci1394_self_id_count_is_error(reg)) { ohci_notice(ohci, "self ID receive error\n"); - return; + goto end; } =20 trace_self_id_complete(ohci->card.index, reg, ohci->self_id, has_be_heade= r_quirk(ohci)); @@ -1876,7 +1876,7 @@ static void bus_reset_work(struct work_struct *work) =20 if (self_id_count > 252) { ohci_notice(ohci, "bad selfIDSize (%08x)\n", reg); - return; + goto end; } =20 quadlet =3D cond_le32_to_cpu(ohci->self_id[0], has_be_header_quirk(ohci)); @@ -1903,7 +1903,7 @@ static void bus_reset_work(struct work_struct *work) =20 ohci_notice(ohci, "bad self ID %d/%d (%08x !=3D ~%08x)\n", j, self_id_count, id, id2); - return; + goto end; } ohci->self_id_buffer[j] =3D id; } @@ -1913,13 +1913,13 @@ static void bus_reset_work(struct work_struct *work) if (self_id_count < 0) { ohci_notice(ohci, "could not construct local self ID\n"); - return; + goto end; } } =20 if (self_id_count =3D=3D 0) { ohci_notice(ohci, "no self IDs\n"); - return; + goto end; } rmb(); =20 @@ -1941,7 +1941,7 @@ static void bus_reset_work(struct work_struct *work) new_generation =3D ohci1394_self_id_count_get_generation(reg); if (new_generation !=3D generation) { ohci_notice(ohci, "new bus reset, discarding self ids\n"); - return; + goto end; } =20 // FIXME: Document how the locking works. @@ -2002,6 +2002,8 @@ static void bus_reset_work(struct work_struct *work) self_id_count, ohci->self_id_buffer, ohci->csr_state_setclear_abdicate); ohci->csr_state_setclear_abdicate =3D false; +end: + return IRQ_HANDLED; } =20 static irqreturn_t irq_handler(int irq, void *data) @@ -2023,13 +2025,10 @@ static irqreturn_t irq_handler(int irq, void *data) event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr)); trace_irqs(ohci->card.index, event); =20 - // The flag is masked again at bus_reset_work() scheduled by selfID event. + // The flag is masked again at handle_selfid_complete_event() scheduled b= y selfID event. if (event & OHCI1394_busReset) reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); =20 - if (event & OHCI1394_selfIDComplete) - queue_work(selfid_workqueue, &ohci->bus_reset_work); - if (event & OHCI1394_RQPkt) queue_work(ohci->card.async_wq, &ohci->ar_request_ctx.work); =20 @@ -2100,7 +2099,10 @@ static irqreturn_t irq_handler(int irq, void *data) } else flush_writes(ohci); =20 - return IRQ_HANDLED; + if (event & OHCI1394_selfIDComplete) + return IRQ_WAKE_THREAD; + else + return IRQ_HANDLED; } =20 static int software_reset(struct fw_ohci *ohci) @@ -2413,7 +2415,7 @@ static int ohci_set_config_rom(struct fw_card *card, * then set up the real values for the two registers. * * We use ohci->lock to avoid racing with the code that sets - * ohci->next_config_rom to NULL (see bus_reset_work). + * ohci->next_config_rom to NULL (see handle_selfid_complete_event). */ =20 next_config_rom =3D dmam_alloc_coherent(ohci->card.device, CONFIG_ROM_SIZ= E, @@ -3620,7 +3622,9 @@ static int pci_probe(struct pci_dev *dev, goto fail_msi; } =20 - err =3D request_threaded_irq(irq, irq_handler, NULL, + // IRQF_ONESHOT is not applied so that any events are handled in the hard= IRQ handler during + // invoking the threaded IRQ handler for SelfIDComplete event. + err =3D request_threaded_irq(irq, irq_handler, handle_selfid_complete_eve= nt, pci_dev_msi_enabled(dev) ? 0 : IRQF_SHARED, ohci_driver_name, ohci); if (err < 0) { --=20 2.48.1 From nobody Fri Oct 3 21:56:44 2025 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-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 39BE9221FA8 for ; Sat, 23 Aug 2025 03:10:04 +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=1755918607; cv=none; b=X7B2K4/BKwIkvzN2mlgGlosgbawpMezQ/95wWDd8ZNv4SVRYWTxaAGyL7NdKeSjs0N4NHiZ5WbCDQDf7FyXK2kAJ2cNOtnJcMx5PzRhPxajzKp8rReLCqe8+KkxbDfpFk6xZP4PDOeJab/88fideOBSUZo7TJ71+5KssySWSj90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755918607; c=relaxed/simple; bh=la1nhYEMWtyPRbgkwvt2StkNx/jLA6+yUilmu8b9U1E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nmpmOFmB+y1vpSEuZwFhNKOCiX6Rn/bBjInJoBzzORgy8cdpgOOfDo9+zCRZsDuDDT4ZszxQ2eIVKjhAfHpvaGnl3VISPLQykjJpmzVfvovjT7RCy2KpFYgROkZHwtx0GnYC245Tjg0hV+fX8rAM8BuvIr14iORo+gV3JNr0UEU= 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=WdqF83WY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gPGwl4Ty; 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="WdqF83WY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gPGwl4Ty" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 401F014000BE; Fri, 22 Aug 2025 23:10:04 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 22 Aug 2025 23:10:04 -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=1755918604; x= 1756005004; bh=8Aeil4IxTwnNb4l2xQs001wJqzMLlOVlrN2kqxgWY4Y=; b=W dqF83WYSquIoG+n5SP8MGMNA4v9DfAZXoQy+3JQhiB02v6TtRMmFgcHSAhn2orl1 K6fV3wEbKTjzuCIoEXoVVKOF8FUrnAaKEAiaBtNUktbjfzMjSdTWJ0O6o2wMxcrB OHIFinagmanlPK1En+VxnoNiMeIhGzWXRGxv+5UhaMzmfgTJL7KW/X0wxB9M7Kzl fMGwZt1+zBSaLOFw+a4XmIoqUWakixrj3qVdFkAcl+lmhn7GiOqQyWggA3Qx+7Q3 sYM4ZkEIbXb1fqE2KBW4OlrigxWhuTDPB0fdb6JV9vbE1/EVhvXB/SQXJZXPkudd lGp6J2MJGn1h7hrjWUdZw== 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-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755918604; x=1756005004; bh=8 Aeil4IxTwnNb4l2xQs001wJqzMLlOVlrN2kqxgWY4Y=; b=gPGwl4TyvkGP9VpD4 9KVq3GQM5nEyG1TEierybuAzlBtD+y+BFDFw3SdzZDNWN3Dn+75ajGJq5kiNa/3B zZWPIE3j59Bg7SGm4IhYNt7jv0x5cDWDDGxoGTgcy1XGQNuo+2qoC1x9cW2Ez8th ub9UznE3qQHfRHiTl5vpk3LUtMPyPH2SoFc2SfVpR71Du5soj84D9jRfI5n9T8SF Bc4sDfEAA1as7MOf+GRymVr5GtTGXUvIhkN1/0vs/d/W8TvLKYPVsfkS8FDgjbgs XHyte6IRJPk+Ml2epPHd7kpqnbUtsKc+Ia7MX/qSlPkgW9axTunChF8kDLzUwR/T OPr5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduieehheduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgjeeuvd fguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhppdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehlihhnuhigudefleegqdguvghvvghlsehlihhsthhsrdhsohhurh gtvghfohhrghgvrdhnvghtpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgv rhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Aug 2025 23:10:02 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/3] firewire: ohci: remove module-local workqueue Date: Sat, 23 Aug 2025 12:09:54 +0900 Message-ID: <20250823030954.268412-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250823030954.268412-1-o-takashi@sakamocchi.jp> References: <20250823030954.268412-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" Now module-local workqueue has been replaced by a threaded IRQ handler. This commit removes the workqueue and the associated work item accordingly. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 5b16286280e0..40851b120615 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -228,13 +228,10 @@ struct fw_ohci { =20 __le32 *self_id; dma_addr_t self_id_bus; - struct work_struct bus_reset_work; =20 u32 self_id_buffer[512]; }; =20 -static struct workqueue_struct *selfid_workqueue; - static inline struct fw_ohci *fw_ohci(struct fw_card *card) { return container_of(card, struct fw_ohci, card); @@ -3512,8 +3509,6 @@ static int pci_probe(struct pci_dev *dev, spin_lock_init(&ohci->lock); mutex_init(&ohci->phy_reg_mutex); =20 - INIT_WORK(&ohci->bus_reset_work, bus_reset_work); - if (!(pci_resource_flags(dev, 0) & IORESOURCE_MEM) || pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE) { ohci_err(ohci, "invalid MMIO resource\n"); @@ -3668,7 +3663,6 @@ static void pci_remove(struct pci_dev *dev) reg_write(ohci, OHCI1394_IntMaskClear, ~0); flush_writes(ohci); } - cancel_work_sync(&ohci->bus_reset_work); fw_core_remove_card(&ohci->card); =20 /* @@ -3741,17 +3735,12 @@ static struct pci_driver fw_ohci_pci_driver =3D { =20 static int __init fw_ohci_init(void) { - selfid_workqueue =3D alloc_workqueue(KBUILD_MODNAME, WQ_MEM_RECLAIM, 0); - if (!selfid_workqueue) - return -ENOMEM; - return pci_register_driver(&fw_ohci_pci_driver); } =20 static void __exit fw_ohci_cleanup(void) { pci_unregister_driver(&fw_ohci_pci_driver); - destroy_workqueue(selfid_workqueue); } =20 module_init(fw_ohci_init); --=20 2.48.1