Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/soundwire/cadence_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,14 @@ irqreturn_t sdw_cdns_irq(int irq, void *dev_id)

cdns_read_response(cdns);

/*
* Clear interrupt before signalling the completion to avoid
* a race between this thread and the main thread starting
* another TX.
*/
cdns_writel(cdns, CDNS_MCP_INTSTAT, CDNS_MCP_INT_RX_WL);
int_status &= ~CDNS_MCP_INT_RX_WL;

Copy link
Member

Choose a reason for hiding this comment

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

You may be on to something....

The assumption was that the complete() would only be handled AFTER this routine completes. That's why we only clear the interrupts in one shot at the end.

If indeed the complete() can lead to another read/write being sent then indeed that would be real bad.

if (defer && defer->msg) {
cdns_fill_msg_resp(cdns, defer->msg,
defer->length, 0);
Expand Down
Loading