lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410023438.487017-2-yung-chuan.liao@linux.intel.com>
Date: Wed, 10 Apr 2024 02:34:35 +0000
From: Bard Liao <yung-chuan.liao@...ux.intel.com>
To: linux-sound@...r.kernel.org,
	vkoul@...nel.org,
	broonie@...nel.org,
	tiwai@...e.de
Cc: vinod.koul@...aro.org,
	linux-kernel@...r.kernel.org,
	pierre-louis.bossart@...ux.intel.com,
	bard.liao@...el.com
Subject: [PATCH 1/4] ASoC: SOF: Intel: hda: disable SoundWire interrupt later

From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>

The SoundWire interrupts can be masked at two levels
a) in the Cadence IP
b) at the HDaudio controller level

We have an existing mechanism with cancel_work_sync() and status flags
to make sure all existing interrupts are handled in the Cadence IP,
and likewise no new interrupts can be generated before turning off the
links.

However on remove we first use the higher-level mask at the controller
level, which is a sledgehammer preventing interrupts from all
links. This is very racy and not necessary. We can disable the
SoundWire interrupts after all the cleanups are done without any loss
of functionality.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
---
 sound/soc/sof/intel/hda.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7fe72b065451..ecfdb8f882d2 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -384,12 +384,12 @@ static int hda_sdw_exit(struct snd_sof_dev *sdev)
 
 	hdev = sdev->pdata->hw_pdata;
 
-	hda_sdw_int_enable(sdev, false);
-
 	if (hdev->sdw)
 		sdw_intel_exit(hdev->sdw);
 	hdev->sdw = NULL;
 
+	hda_sdw_int_enable(sdev, false);
+
 	return 0;
 }
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ