From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796386974; b=GHbMJKNUfAXrmBnpYosAJaY6I5+PfIIUaiLn2MYecq0A7YmXcjEKHH33gQcDoPxZ+al4 ukjzDS/JUnNJ3Ip56nMPeFcpb1zvif0J2dFLOGmWMc2I1kEyBpL2VOpXF95KTIe6NtgMR Po6z1puqEixclLI6nuy0MeESJB6EXdP75pBFIBvvAFcfknBt72xJR1MIPbN4cGedC7xhe Nw+kSLNp0zDU1fdHyJtD7zG2Cvx0uViqPfOOAC4Ni8+CtzQ3pxYyRko15DQirsoXAZeNz 1OS7TS2sIy/xb2cS5Dp7JQLIWOKtClof3jZxjK70ri2B4FUUuSgfG5d/ikgIpOg5Jsg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386974; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=oVeFw/wrCXzcmErxPHwwZTyxJMYHD2e/oOklN8vqfIc=; b=SY8rUwMboPCvERcKWr6HXGXJXL8kI8BdYuWDkgXgPvqqrvgw0mTyux+A01q5tevTrDyw Zqygvf+OVCDGrekAdHAUcB4bDRlTKi6D/HdueyNwwUkgusHjt6pgHTUNnhoxPTg+JX8os LoPO6ZFyWUJTLMfw1XSEtugagLSik7BMw5QiB5cWdeohrAw5/NOa1WqG1bzCj3dciarm/ ZbYiYFDTUOlQepUFxDUOtUF81UrfO2ac2Y4tkz2B6URD1El0EAkailG6UZWA0N7zghpPt TJE9VcKInefSIoJDGYy9RKf7hYn464axupbkRiJhJuhQhqarH3ZQX+OShj10W2tONfQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="Og8CWZL/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6800606A322; Fri, 4 Dec 2026 12:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Og8CWZL/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F1E31F00897; Fri, 4 Dec 2026 12:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796386974; bh=oVeFw/wrCXzcmErxPHwwZTyxJMYHD2e/oOklN8vqfIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Og8CWZL/dlaXYacinlF89UrnldDaXn+LtAKqv90WTSqZudvSc+X9t6/ssVo/M5CAi 7xy0CJXNg1sLR0gj7Q4A8MF83NkSLs8Vf2fkc8dP02NmIzp6jk8aOJHcovN5Ogf8DW X+9RAVg+t1YQYNnPhhgjBOYn+1T2GhfpC9oQD3qw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Jerome Brunet , Mark Brown , Sasha Levin Subject: [PATCH 6.1 0080/1059] ASoC: meson: axg-fifo: request the irq with the clock enabled Date: Fri, 4 Dec 2026 18:53:31 +0900 Message-ID: <20261204100646.180027624@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jerome Brunet [ Upstream commit 82fa7bfab6b961a03d6575348334e0ec15fdc712 ] The fifo irq handler accesses registers which need pclk, but the irq is requested before pclk is enabled on open and freed after it is disabled on close. Request the irq after enabling pclk and masking the fifo irqs. Free it before disabling pclk. Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver") Reported-by: Sashiko Closes: https://sashiko.dev/#/bug/linux-30e88a8a-f33a-40f0-92aa-9ea62c5b7299 Signed-off-by: Jerome Brunet Link: https://patch.msgid.link/20261030-asoc-axg-fifo-irq-clock-v1-1-f8c170ac8b0d@baylibre.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/axg-fifo.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index 5218e40aeb1bb..4a81aa3f384f0 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -244,17 +244,10 @@ int axg_fifo_pcm_open(struct snd_soc_component *component, if (ret) return ret; - /* Use the threaded irq handler only with non-atomic links */ - ret = request_threaded_irq(fifo->irq, NULL, - axg_fifo_pcm_irq_block, - IRQF_ONESHOT, dev_name(dev), ss); - if (ret) - return ret; - /* Enable pclk to access registers and clock the fifo ip */ ret = clk_prepare_enable(fifo->pclk); if (ret) - goto free_irq; + return ret; /* Setup status2 so it reports the memory pointer */ regmap_update_bits(fifo->map, FIFO_CTRL1, @@ -271,17 +264,24 @@ int axg_fifo_pcm_open(struct snd_soc_component *component, /* Clear any pending interrupt */ axg_fifo_ack_irq(fifo, FIFO_INT_MASK); + /* Use the threaded irq handler only with non-atomic links */ + ret = request_threaded_irq(fifo->irq, NULL, + axg_fifo_pcm_irq_block, + IRQF_ONESHOT, dev_name(dev), ss); + if (ret) + goto free_clk; + /* Take memory arbitror out of reset */ ret = reset_control_deassert(fifo->arb); if (ret) - goto free_clk; + goto free_irq; return 0; -free_clk: - clk_disable_unprepare(fifo->pclk); free_irq: free_irq(fifo->irq, ss); +free_clk: + clk_disable_unprepare(fifo->pclk); return ret; } EXPORT_SYMBOL_GPL(axg_fifo_pcm_open); @@ -295,12 +295,12 @@ int axg_fifo_pcm_close(struct snd_soc_component *component, /* Put the memory arbitror back in reset */ ret = reset_control_assert(fifo->arb); - /* Disable fifo ip and register access */ - clk_disable_unprepare(fifo->pclk); - /* remove IRQ */ free_irq(fifo->irq, ss); + /* Disable fifo ip and register access */ + clk_disable_unprepare(fifo->pclk); + return ret; } EXPORT_SYMBOL_GPL(axg_fifo_pcm_close); -- 2.53.0