From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 34ACE34D90C; Tue, 6 Jan 2026 17:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767720061; cv=none; b=RJPBUoEpJA8NXiaGLVnk8GNr73Sh5fnBCt6GNSkU6TS+CKuJ5HyeoQztZAe4fuz8HWmBMwiPpW6MbhIGwTYogOJnZcHYitpRGrg/hbGl+OigZVdpYGQaT0zSEeR3/yKYso5NsgX9lqW30PgZuge107ZdXZ0fbF8oMcw+lOBtMXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767720061; c=relaxed/simple; bh=VxUeamOwkSE+F24J6rFKVa7RDXOjFl2fFJkkAeucA/s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZF3v2Kl3uNP4bvGVENwLuNh5FLLaI+FENRN9uA5rVoweyOdTBTaAPk9DJg05lkb4HHG1j0cGSb5eraFhKkDPaGtaNqdnPlYzmENhFALD3362zPRlicZmbLN4M+vtrCTrawHVbj6IxWmCnvbXO5t8iqndVV41Q52MnR/PMPK/3NY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xAF4AILv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xAF4AILv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E510C116C6; Tue, 6 Jan 2026 17:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767720060; bh=VxUeamOwkSE+F24J6rFKVa7RDXOjFl2fFJkkAeucA/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xAF4AILvu6In+s1ivfim54jR9DGQoemLgFrAvS1E9uZ3iu526dnip6SwtE5fP0i1N Ln8c5gu46jdID4ruUkmNqHDCSZmB+pvTyif6sk9ptdI9vAL4KpPkhyNhJOkpKUYTsb 3tHiSeN6JbYnA51m6KMy9WNJJBNrIU0Ydp+vfRAI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Frank Li , Peng Fan , Shawn Guo , Sasha Levin Subject: [PATCH 6.12 122/567] firmware: imx: scu-irq: Init workqueue before request mbox channel Date: Tue, 6 Jan 2026 17:58:24 +0100 Message-ID: <20260106170455.841569141@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106170451.332875001@linuxfoundation.org> References: <20260106170451.332875001@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peng Fan [ Upstream commit 81fb53feb66a3aefbf6fcab73bb8d06f5b0c54ad ] With mailbox channel requested, there is possibility that interrupts may come in, so need to make sure the workqueue is initialized before the queue is scheduled by mailbox rx callback. Reviewed-by: Frank Li Signed-off-by: Peng Fan Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- drivers/firmware/imx/imx-scu-irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index f2b902e95b73..b9f6128d56f7 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -214,6 +214,8 @@ int imx_scu_enable_general_irq_channel(struct device *dev) cl->dev = dev; cl->rx_callback = imx_scu_irq_callback; + INIT_WORK(&imx_sc_irq_work, imx_scu_irq_work_handler); + /* SCU general IRQ uses general interrupt channel 3 */ ch = mbox_request_channel_byname(cl, "gip3"); if (IS_ERR(ch)) { @@ -223,8 +225,6 @@ int imx_scu_enable_general_irq_channel(struct device *dev) return ret; } - INIT_WORK(&imx_sc_irq_work, imx_scu_irq_work_handler); - if (!of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells", 0, &spec)) { i = of_alias_get_id(spec.np, "mu"); -- 2.51.0