Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0574a846 authored by Can Guo's avatar Can Guo Committed by Todd Kjos
Browse files

BACKPORT: FROMGIT: scsi: ufs: Properly release resources if a task is aborted successfully

In current UFS task abort hook, namely ufshcd_abort(), if one task is
aborted successfully, clk_gating.active_reqs held by this task is not
decreased, which makes clk_gating.active_reqs stay above zero forever, thus
clock gating would never happen. Instead of releasing resources of one task
"manually", use the existing func __ufshcd_transfer_req_compl().  This
change also eliminates a possible race of scsi_dma_unmap() from the real
completion in IRQ handler path.

Link: https://lore.kernel.org/r/1596975355-39813-10-git-send-email-cang@codeaurora.org


Fixes: 5a0b0cb9 ("ufs: Add support for clock gating")
CC: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Reviewed-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

Bug: 165343119
(cherry picked from commit 35afe60929abd61567f48608e55f5987c6fd1aa0
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git

 5.10/scsi-queue)
Change-Id: Ief56863c07fc9b7983d48a4ab91916ffc0b07b14
[can: Resolved minor conflict in ufshcd_abort()]
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 76907b83
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment