From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2B5224F7CD7; Thu, 17 Sep 2026 17:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789667716; cv=none; b=F2fgMGB8JINlRXQFrc6a2X/DMyGfE4OSx6NFHEnlP0ajHqiVYY5KxNMbMIzMa3gzIP2PG2H2HTmEXxmPusXMSh/TGg3ZLIP4BMJPyti1WOj7kQztSUKNmDCy70KCiUmEbBFhCK0dxbEqvs0sIh1qkEVwKUsgRlSTAn8hKYie1/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789667716; c=relaxed/simple; bh=H21uOHenG/k5lPEMFV8/YWOUTnYYghbVsGYkKFlsTjU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q6vlVVBViEZVPBG6nMIzpVwNd6u5lW/3kBpmPI7GXjZuCq5Tg20FuMwZ7ZvkK+WfxuCrYaxZEQbCSdBiitQsglHamRZzGA+SfJ8p3X5vOZRRoMqBwXwVVB25I3jka58ly2odkpNIV4mLGAbrCjBGdWfsxH6eEpqAZeJr6H0VE8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DVxpZwi7; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DVxpZwi7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 753441F000FF; Thu, 17 Sep 2026 17:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789667715; bh=aA3ftfC7Uvf7RbPsVWohdCbx85/ez0TF+G7t5chiBGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DVxpZwi76WqIP59zBvgLwiCNidsLAj7MdUfEHURzkHjhiBrLhz4KqNjbPmfa8fhbd K4YJ9jW9lcFX6GUUm5Jtd8SoKXERMolLF5r6Zg2txsE61lUfA2UEn+SQDeYBJ03qlD 7/5r8hu5mGdPIDrRoGX6Xc3xyGUleS4uQgMIN7MY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bard Liao , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , Ranjani Sridharan , Pierre-Louis Bossart , Vinod Koul , Sasha Levin Subject: [PATCH 6.12 0186/1102] soundwire: only handle alert events when the peripheral is attached Date: Thu, 17 Sep 2026 16:02:09 +0100 Message-ID: <20260917151544.233532915@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151539.408551884@linuxfoundation.org> References: <20260917151539.408551884@linuxfoundation.org> User-Agent: quilt/0.69 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 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bard Liao [ Upstream commit 38cd651ebce7065a81c7e950d9e2ea1572304605 ] It doesn't make sense to handle an alert event when the peripheral is not attached. The slave->status could be SDW_SLAVE_ATTACHED or SDW_SLAVE_ALERT when it is attached on the bus. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20260520025720.1999367-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/bus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 25efafd89c036..0e339bbe27da3 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -1925,6 +1925,10 @@ int sdw_handle_slave_status(struct sdw_bus *bus, break; case SDW_SLAVE_ALERT: + if (slave->status != SDW_SLAVE_ATTACHED && + slave->status != SDW_SLAVE_ALERT) + continue; + ret = sdw_handle_slave_alerts(slave); if (ret < 0) dev_err(&slave->dev, -- 2.53.0