]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: Abort tasks before clearing them from doorbell
authorCan Guo <cang@codeaurora.org>
Tue, 25 Aug 2020 02:07:05 +0000 (19:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 3 Sep 2020 02:49:06 +0000 (22:49 -0400)
commit78bd315d94e795aeaeec611a895a3d9fa324bfca
tree90e4d9ecaff674e0e4029334a92a9677f3cd3d52
parentfec97d73cfa3f7bd06ba4e6a43bccefe05490de9
scsi: ufs: Abort tasks before clearing them from doorbell

To recover non-fatal errors, no full reset is required, err_handler only
clears those pending TRs/TMRs so that SCSI layer can re-issue them. In
current err_handler, TRs are directly cleared from UFS host's doorbell but
not aborted from device side. However, according to the UFSHCI JEDEC spec,
the host software shall use UTP Transfer Request List Clear Register to
clear a task from UFS host's doorbell only when a UTP Transfer Request is
expected to not be completed, e.g. when the host software receives a
“FUNCTION COMPLETE” Task Management response which means a Transfer Request
was aborted. To follow the UFSHCI JEDEC spec, in err_handler, abort one TR
before clearing it from doorbell.

Link: https://lore.kernel.org/r/1598321228-21093-2-git-send-email-cang@codeaurora.org
Acked-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c