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 4B0092E5439; Tue, 8 Jul 2025 16:56:38 +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=1751993798; cv=none; b=rWF7wIYBwE5nYeCcEJJoz+kjZieFpAae2uXcM6G5hreezNxSA8RqfNaq7N2pI4whZOcGSo8Y3wctk9p3sBcHrkUXlYpBCPuYBtNGygB5m1wAEO9xkWAxTg9YYkq3g80W8JWZuo0Q5OtY5KblibCcOyIeGcw1Ny5fO2UFlWgsi+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751993798; c=relaxed/simple; bh=QjI4bGFaAaIBlS+wrkbJs3bWl5PMveKVVEguB8i1Jrw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J0QUstmpiPc6vsD3jpB+dh5HRzhDZxAkddQUOcIxdE/Nk/T7maGvfxAzx2EW2V8cGvevIUVJr4AgiOEVluh8wqOuvtNvonq/ov9ah90K/NyhCwWuKh89/xtHyp89SNDtlannLdUUeyBlJEGq4txRGKcYFK+O1Ga9aTSyGVGSr1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2CgIMinY; 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="2CgIMinY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4410C4CEF0; Tue, 8 Jul 2025 16:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751993798; bh=QjI4bGFaAaIBlS+wrkbJs3bWl5PMveKVVEguB8i1Jrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2CgIMinY09H8hPfJZuJSD5Rr4/7nhOzaXMQLKnNiQXZdMX0WcAHQS+lEVgX3+p/tR aRMOLYoFKXOdrQZEQL1fdBfLZ5rZVr4tou7PANdzP81sE2AizYdCmxPe4TWO1qnYtc 7gDJ51N9i0Zt3Wew9L//DFL7uoahRE+A6w3xGb2E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski , Takashi Iwai , Sasha Levin Subject: [PATCH 5.15 022/160] ALSA: hda: Ignore unsol events for cards being shut down Date: Tue, 8 Jul 2025 18:20:59 +0200 Message-ID: <20250708162232.121835852@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162231.503362020@linuxfoundation.org> References: <20250708162231.503362020@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore 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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cezary Rojewski [ Upstream commit 3f100f524e75586537e337b34d18c8d604b398e7 ] For the classic snd_hda_intel driver, codec->card and bus->card point to the exact same thing. When snd_card_diconnect() fires, bus->shutdown is set thanks to azx_dev_disconnect(). card->shutdown is already set when that happens but both provide basically the same functionality. For the DSP snd_soc_avs driver where multiple codecs are located on multiple cards, bus->shutdown 'shortcut' is not sufficient. One codec card may be unregistered while other codecs are still operational. Proper check in form of card->shutdown must be used to verify whether the codec's card is being shut down. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250530141309.2943404-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/hda_bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index 8e35009ec25cb..a22f723ab3ab6 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -45,7 +45,7 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev) struct hda_codec *codec = container_of(dev, struct hda_codec, core); /* ignore unsol events during shutdown */ - if (codec->bus->shutdown) + if (codec->card->shutdown || codec->bus->shutdown) return; /* ignore unsol events during system suspend/resume */ -- 2.39.5