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 BDB7C28EB for ; Mon, 30 Jan 2023 14:00:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21E80C433D2; Mon, 30 Jan 2023 14:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1675087241; bh=x+gOVXtRDYV5uej9F6oIqNv17uN1ek1roduVasw9TaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vz1DCEuFUSPmd3W0l8Zl5IfomHE5SqKE8sVpEouDQLDLT/PHs+FhndFiWVJOB23HM useSxtkRSdw87AfA5F6OS3dZ/FhAPtv1ZX1KtAcgvxDlYGxoSf4ujiReeZ5ScCreOY oavysqhgZVsc5G4uwF7TmbO5MiEn7SB+3ZSTvEiI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Curtis Malainey , Ranjani Sridharan , Pierre-Louis Bossart , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , Mark Brown , Sasha Levin Subject: [PATCH 6.1 144/313] ASoC: SOF: Add FW state to debugfs Date: Mon, 30 Jan 2023 14:49:39 +0100 Message-Id: <20230130134343.368975414@linuxfoundation.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130134336.532886729@linuxfoundation.org> References: <20230130134336.532886729@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: Curtis Malainey [ Upstream commit 9a9134fd56f6ba614ff7b2b3b0bac0bf1d0dc0c9 ] Allow system health detection mechanisms to check the FW state, this will allow them to check if the FW is in its "crashed" state going forward to help automatically diagnose driver state. Signed-off-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221220125629.8469-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index d9a3ce7b69e1..ade0507328af 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -353,7 +353,9 @@ int snd_sof_dbg_init(struct snd_sof_dev *sdev) return err; } - return 0; + return snd_sof_debugfs_buf_item(sdev, &sdev->fw_state, + sizeof(sdev->fw_state), + "fw_state", 0444); } EXPORT_SYMBOL_GPL(snd_sof_dbg_init); -- 2.39.0