Skip to content

soundwire: cadence_master: wait and cancel cdns->work before clock stop - #5863

Open
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:cancel-work-before-clock-stop
Open

soundwire: cadence_master: wait and cancel cdns->work before clock stop#5863
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:cancel-work-before-clock-stop

Conversation

@bardliao

Copy link
Copy Markdown
Collaborator

A peripheral event could happen druing the clock stup process. We need to wait for the event be handled before stoping the bus clock. Otherwise, we will get the IO transfer timed out issue.

Fixes: af4cc91 ("soundwire: cadence: mask Slave interrupt before stopping clock")

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent peripheral-event handling from racing with the SoundWire Cadence master clock-stop sequence, which can otherwise lead to IO transfer timeouts during suspend/clock stop.

Changes:

  • Adds a workqueue cancellation/wait step before stopping the bus clock in sdw_cdns_clock_stop().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread drivers/soundwire/cadence_master.c Outdated
Comment on lines +1715 to +1719
/*
* wait for any in-flight peripheral event handling to complete before
* stopping the clock
*/
cancel_work_sync(&cdns->work);
A peripheral event could happen druing the clock stup process. We need
to wait for the event be handled before stoping the bus clock.
Otherwise, we will get the IO transfer timed out issue.

Fixes: af4cc91 ("soundwire: cadence: mask Slave interrupt before stopping clock")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Copilot AI review requested due to automatic review settings July 31, 2026 08:49
@bardliao
bardliao force-pushed the cancel-work-before-clock-stop branch from 800a81e to 32da271 Compare July 31, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread drivers/soundwire/cadence_master.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants