From patchwork Fri Dec 4 02:41:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1410776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CnH6p0N3zz9sSs; Fri, 4 Dec 2020 13:42:26 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kl136-0004HE-6l; Fri, 04 Dec 2020 02:42:20 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kl12q-000472-BB for kernel-team@lists.ubuntu.com; Fri, 04 Dec 2020 02:42:04 +0000 Received: from [111.196.65.193] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kl12n-0005Sm-A7 for kernel-team@lists.ubuntu.com; Fri, 04 Dec 2020 02:42:02 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.10][PATCH 09/21] UBUNTU: SAUCE: soundwire: bus: reset slave_notify status at each loop Date: Fri, 4 Dec 2020 10:41:20 +0800 Message-Id: <20201204024132.12905-10-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201204024132.12905-1-hui.wang@canonical.com> References: <20201204024132.12905-1-hui.wang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Pierre-Louis Bossart BugLink: https://bugs.launchpad.net/bugs/1906738 The code loops multiple times to deal with pending interrupts, but we never reset the slave_notify status. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao (cherry picked from commit 9834967f16f7fa2d6dddafc1d98b4e2d80333040 git://github.com/thesofproject/linux.git topic/sof-dev-rebase) Signed-off-by: Hui Wang --- drivers/soundwire/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 45131b9f5080..d6e646521819 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -1425,7 +1425,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) u8 clear = 0, bit, port_status[15] = {0}; int port_num, stat, ret, count = 0; unsigned long port; - bool slave_notify = false; + bool slave_notify; u8 sdca_cascade = 0; u8 buf, buf2[2], _buf, _buf2[2]; bool parity_check; @@ -1467,6 +1467,8 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) } do { + slave_notify = false; + /* * Check parity, bus clash and Slave (impl defined) * interrupt