All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
	linux-sound@vger.kernel.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
	peter.ujfalusi@linux.intel.com, bard.liao@intel.com,
	david.lin@intel.com
Subject: Re: [PATCH] soundwire: cadence_master: wait and cancel cdns->work before clock stop
Date: Fri, 4 Sep 2026 09:26:32 +0200	[thread overview]
Message-ID: <4e445256-f9aa-4cc9-a2e1-fa45500dbba0@linux.dev> (raw)
In-Reply-To: <20260901031019.233254-1-yung-chuan.liao@linux.intel.com>

On 9/1/26 05:10, Bard Liao wrote:
> A peripheral event could happen during the clock stop process. We need
> to wait for the event be handled before stopping the bus clock.
> Otherwise, we will get the IO transfer timed out issue.
> 
> Fixes: af4cc917826f ("soundwire: cadence: mask Slave interrupt before stopping clock")
> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: David Lin <david.lin@intel.com>
> Reviewed-by: Shuming Fan <shumingf@realtek.com>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>

> ---
>  drivers/soundwire/cadence_master.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index 6fa3739221ee..c41971f4f177 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -1702,6 +1702,13 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake)
>  		return 0;
>  	}
>  
> +	/*
> +	 * wait for any in-flight peripheral event handling to complete before stopping the clock.
> +	 * No need to disable peripheral interrupts before canceling the work, as the peripheral
> +	 * interrupts are already masked before the work is scheduled.
> +	 */
> +	cancel_work_sync(&cdns->work);
> +
>  	/*
>  	 * Before entering clock stop we mask the Slave
>  	 * interrupts. This helps avoid having to deal with e.g. a


  reply	other threads:[~2026-09-04  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  3:10 [PATCH] soundwire: cadence_master: wait and cancel cdns->work before clock stop Bard Liao
2026-09-04  7:26 ` Pierre-Louis Bossart [this message]
2026-09-08 13:55 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e445256-f9aa-4cc9-a2e1-fa45500dbba0@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=bard.liao@intel.com \
    --cc=david.lin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=vinod.koul@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.