Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-09-09 Thread Vinod Koul
On 08-09-20, 13:58, Jaroslav Kysela wrote: > Dne 28. 08. 20 v 17:14 Pierre-Louis Bossart napsal(a): > > > > > > > >> Is this timeout for suspend or resume? Somehow I was under the > >> assumption that it is former? Or is the result seen on resume? > >> > >> Rereading the race describe above in

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-09-08 Thread Jaroslav Kysela
Dne 28. 08. 20 v 17:14 Pierre-Louis Bossart napsal(a): > > > >> Is this timeout for suspend or resume? Somehow I was under the >> assumption that it is former? Or is the result seen on resume? >> >> Rereading the race describe above in steps, I think this should be >> handled in step c above.

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-28 Thread Pierre-Louis Bossart
Is this timeout for suspend or resume? Somehow I was under the assumption that it is former? Or is the result seen on resume? Rereading the race describe above in steps, I think this should be handled in step c above. Btw is that suspend or runtime suspend which causes this? Former would be

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-28 Thread Vinod Koul
On 21-08-20, 10:17, Pierre-Louis Bossart wrote: > > > > > cancel_work_sync() will either > > > a) wait until the current work completes, or > > > b) prevent a new one from starting. > > > > > > there's no way to really 'abort' a workqueue, 'cancel' means either > > > complete > > > or don't

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-21 Thread Pierre-Louis Bossart
cancel_work_sync() will either a) wait until the current work completes, or b) prevent a new one from starting. there's no way to really 'abort' a workqueue, 'cancel' means either complete or don't start. Quite right, as that is how everyone deals with it. Stop the irq from firing first

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-20 Thread Vinod Koul
On 19-08-20, 07:51, Pierre-Louis Bossart wrote: > > > On 8/19/20 4:06 AM, Vinod Koul wrote: > > On 18-08-20, 06:23, Bard Liao wrote: > > > From: Pierre-Louis Bossart > > > > > > In system suspend stress cases, the SOF CI reports timeouts. The root > > > cause is that an alert is generated

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-19 Thread Pierre-Louis Bossart
On 8/19/20 4:06 AM, Vinod Koul wrote: On 18-08-20, 06:23, Bard Liao wrote: From: Pierre-Louis Bossart In system suspend stress cases, the SOF CI reports timeouts. The root cause is that an alert is generated while the system suspends. The interrupt handling generates transactions on the

Re: [PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-19 Thread Vinod Koul
On 18-08-20, 06:23, Bard Liao wrote: > From: Pierre-Louis Bossart > > In system suspend stress cases, the SOF CI reports timeouts. The root > cause is that an alert is generated while the system suspends. The > interrupt handling generates transactions on the bus that will never > be handled

[PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart In system suspend stress cases, the SOF CI reports timeouts. The root cause is that an alert is generated while the system suspends. The interrupt handling generates transactions on the bus that will never be handled because the interrupts are disabled in parallel. As