mmc: cmdq_hci: fix race between req completion and clearing CQTCN

CQ irq handler first calls completion path for every notified tag and then
clears CQTCN register for all completed tags. This approach could cause
following problem:
1) issue context (unblocked by tag completion) issues next
request, CQE successfully completes it and notifies task completion
through CQTCN again for the same tag.
2) CQ irq handler proceeds to clear CQTCN for the original request.

In the above scenario clear of CQTCN register will mask next
request completion and issue context will be never unblocked.
Hence clear CQTCN first and then notify the request completion.

Change-Id: Ie644e24279ca30de42bbc9f8e1ae4326609d38a5
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
1 file changed