dmaengine: qcom: bam_dma: Fix completed descriptors count
authorSricharan R <sricharan@codeaurora.org>
Fri, 28 Jun 2019 12:09:46 +0000 (17:39 +0530)
committerVinod Koul <vkoul@kernel.org>
Fri, 5 Jul 2019 07:48:27 +0000 (13:18 +0530)
commitf6034225442c4a87906d36e975fd9e99a8f95487
tree10b9387054c280c946bbe8c504a6441e71e73b75
parent3f93a4f297961c12bb17aa16cb3a4d1291823cae
dmaengine: qcom: bam_dma: Fix completed descriptors count

One space is left unused in circular FIFO to differentiate
'full' and 'empty' cases. So take that in to account while
counting for the descriptors completed.

Fixes the issue reported here,
https://lkml.org/lkml/2019/6/18/669

Cc: stable@vger.kernel.org
Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/qcom/bam_dma.c