ufs: read door bell register after clearing interrupt aggregation
authorDolev Raviv <draviv@codeaurora.org>
Tue, 1 Jul 2014 09:22:37 +0000 (12:22 +0300)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 21:17:01 +0000 (17:17 -0400)
commite9d501b154ff62030670f7a210ed00d4cc2cae26
tree939a814fa231dc2566f90374350f24b44af34842
parent4264fd613a6a4b9c1c91d9291653d0fdaf4fd288
ufs: read door bell register after clearing interrupt aggregation

In interrupt context, after reading and comparing the UTRLDBR to
hba->outstanding_request and before resetting the interrupt aggregation,
there might be completion of another transfer request (TR). Such TRs might
get stuck, pending, until the next interrupt is generated (if any).
Changing the sequence of resetting the interrupt aggregation first and
then reading UTRLDBR status, will assure that completed TRs won't get
stuck pending.

Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/ufs/ufshcd.c