dmaengine: qcom_hidma: check pending interrupts
authorSinan Kaya <okaya@codeaurora.org>
Tue, 14 Nov 2017 14:55:01 +0000 (09:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:56 +0000 (08:42 +0100)
commite09475d698268ac1eb401b20c825dbc153b4cbf6
tree04aa3c92f7faa7c622b80052f7ebd7c138fb61c3
parent4f33fcc68abe7c95f2682b660e2a1d983e24d64f
dmaengine: qcom_hidma: check pending interrupts

[ Upstream commit 38680bc6b1e3592bc9e18adc1d6e259667df27ce ]

Driver is missing the interrupts if two requests are queued up at the same
time as the interrupt handler is servicing a request that was just
delivered.

The ISR clears the interrupt at the end but it could be clearing the
interrupt for an outstanding event. Therefore, second interrupt never
arrives.

Clear the interrupt first and then check for completions.

Also, make sure that request start and interrupt clear do not overlap in
time by using a spinlock.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/qcom/hidma_ll.c