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 9BB3E20E7 for ; Wed, 28 Dec 2022 16:56:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21523C433EF; Wed, 28 Dec 2022 16:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672246596; bh=zmR4BR7B48IU7cWe1TZQw7062P3r25gurysIxwqF2T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kTseQiHpohJyPSa5a04HSKdsJgr/Gu/eyXyBTcOExeHRFOjwEjpckYfJjfFNhz/t1 dStVE7fDdJhtyYSW9kaHkVwvtRjU5MGN9maQEKp9AFR3ohrHnPnF9IsQGReQx8w4Bx xthU2KOFSj3dN2CCe8Fs3AV5OcosgflJwCXK3rfI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Cezary Rojewski , Lukasz Majczak , Mark Brown , Sasha Levin Subject: [PATCH 6.1 1067/1146] ASoC: Intel: Skylake: Fix driver hang during shutdown Date: Wed, 28 Dec 2022 15:43:26 +0100 Message-Id: <20221228144359.242309671@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144330.180012208@linuxfoundation.org> References: <20221228144330.180012208@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Cezary Rojewski [ Upstream commit 171107237246d66bce04f3769d33648f896b4ce3 ] AudioDSP cores and HDAudio links need to be turned off on shutdown to ensure no communication or data transfer occurs during the procedure. Fixes: c5a76a246989 ("ASoC: Intel: Skylake: Add shutdown callback") Signed-off-by: Cezary Rojewski Tested-by: Lukasz Majczak Link: https://lore.kernel.org/r/20221205085330.857665-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/skylake/skl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 3312b57e3c0c..7f058acd221f 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -1116,7 +1116,10 @@ static void skl_shutdown(struct pci_dev *pci) if (!skl->init_done) return; - snd_hdac_stop_streams_and_chip(bus); + snd_hdac_stop_streams(bus); + snd_hdac_ext_bus_link_power_down_all(bus); + skl_dsp_sleep(skl->dsp); + list_for_each_entry(s, &bus->stream_list, list) { stream = stream_to_hdac_ext_stream(s); snd_hdac_ext_stream_decouple(bus, stream, false); -- 2.35.1