Commit eb3d2611 authored by Stanley Chu's avatar Stanley Chu Committed by Martin K. Petersen

scsi: ufs: Add error history for abort event in UFS Device W-LUN

Add error history for abort event in UFS Device W-LUN.

Use specified value as parameter of ufshcd_update_reg_hist() to identify
the aborted tag or LUNs.

Link: https://lore.kernel.org/r/20201205115901.26815-2-stanley.chu@mediatek.comReviewed-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Reviewed-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6dc1c7ab
...@@ -6738,8 +6738,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) ...@@ -6738,8 +6738,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
* To avoid these unnecessary/illegal step we skip to the last error * To avoid these unnecessary/illegal step we skip to the last error
* handling stage: reset and restore. * handling stage: reset and restore.
*/ */
if (lrbp->lun == UFS_UPIU_UFS_DEVICE_WLUN) if (lrbp->lun == UFS_UPIU_UFS_DEVICE_WLUN) {
ufshcd_update_reg_hist(&hba->ufs_stats.task_abort, lrbp->lun);
return ufshcd_eh_host_reset_handler(cmd); return ufshcd_eh_host_reset_handler(cmd);
}
ufshcd_hold(hba, false); ufshcd_hold(hba, false);
reg = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL); reg = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
...@@ -6763,7 +6765,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) ...@@ -6763,7 +6765,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
*/ */
scsi_print_command(hba->lrb[tag].cmd); scsi_print_command(hba->lrb[tag].cmd);
if (!hba->req_abort_count) { if (!hba->req_abort_count) {
ufshcd_update_reg_hist(&hba->ufs_stats.task_abort, 0); ufshcd_update_reg_hist(&hba->ufs_stats.task_abort, tag);
ufshcd_print_host_regs(hba); ufshcd_print_host_regs(hba);
ufshcd_print_host_state(hba); ufshcd_print_host_state(hba);
ufshcd_print_pwr_info(hba); ufshcd_print_pwr_info(hba);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment