Skip to content

Commit

Permalink
[DNM] soundwire: intel_init: re-try to handle interrupts
Browse files Browse the repository at this point in the history
Test the theory that some links can report an interrupt that is lost
if reported *after* the link is handled.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  • Loading branch information
plbossart committed May 6, 2024
1 parent 44a3ce6 commit 069cbaa
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions drivers/soundwire/intel_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,25 @@ irqreturn_t sdw_intel_thread(int irq, void *dev_id)
{
struct sdw_intel_ctx *ctx = dev_id;
struct sdw_intel_link_res *link;
irqreturn_t ret;
int count = 0;

list_for_each_entry(link, &ctx->link_list, list)
sdw_cdns_irq(irq, link->cdns);
list_for_each_entry(link, &ctx->link_list, list) {
ret = sdw_cdns_irq(irq, link->cdns);
if (ret == IRQ_HANDLED)
count++;
}

if (!count)
pr_err("%s: SoundWire interrupt signaled but nothing to handle\n",
__func__);

/* attempt a second pass */
list_for_each_entry(link, &ctx->link_list, list) {
ret = sdw_cdns_irq(irq, link->cdns);
if (ret == IRQ_HANDLED)
dev_err(link->cdns->dev, "New SoundWire interrupt signaled in 2nd pass!!\n");
}

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 069cbaa

Please sign in to comment.