ANDROID: scsi: ufs: Add more logging
The logs attached to bug 196797012 show that the error handler has been activated and also that a SECURITY PROTOCOL OUT command is being retried but not why. Hence this patch that adds more logging. Notes: - The code that initializes the completion status to OCS_INVALID_COMMAND_STATUS was introduced by the initial UFS commit. See also7a3e97b0dc
("[SCSI] ufshcd: UFS Host controller driver"). - The behavior to retry a command if the controller did not overwrite the completion status was introduced by commite8e7f27139
("scsi: ufs: Improve UFS fatal error handling") without explaining why. From that commit: + case OCS_INVALID_COMMAND_STATUS: + result |= DID_REQUEUE << 16; + break; Bug: 196797012 Change-Id: I86ce4149babde1daf07af94464b878e9e697b37b Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
@@ -4015,6 +4015,9 @@ out:
|
|||||||
if (reenable_intr)
|
if (reenable_intr)
|
||||||
ufshcd_enable_intr(hba, UIC_COMMAND_COMPL);
|
ufshcd_enable_intr(hba, UIC_COMMAND_COMPL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
dev_err(hba->dev,
|
||||||
|
"%s: Changing link power status failed (%d). Scheduling error handler\n",
|
||||||
|
__func__, ret);
|
||||||
ufshcd_set_link_broken(hba);
|
ufshcd_set_link_broken(hba);
|
||||||
ufshcd_schedule_eh_work(hba);
|
ufshcd_schedule_eh_work(hba);
|
||||||
}
|
}
|
||||||
@@ -5098,6 +5101,10 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
|
|||||||
result |= DID_ABORT << 16;
|
result |= DID_ABORT << 16;
|
||||||
break;
|
break;
|
||||||
case OCS_INVALID_COMMAND_STATUS:
|
case OCS_INVALID_COMMAND_STATUS:
|
||||||
|
dev_err_ratelimited(hba->dev,
|
||||||
|
"Retrying request with tag %d / cdb %#02x because of invalid command status\n",
|
||||||
|
lrbp->task_tag, lrbp->cmd && lrbp->cmd->cmnd ?
|
||||||
|
lrbp->cmd->cmnd[0] : 0);
|
||||||
result |= DID_REQUEUE << 16;
|
result |= DID_REQUEUE << 16;
|
||||||
break;
|
break;
|
||||||
case OCS_INVALID_CMD_TABLE_ATTR:
|
case OCS_INVALID_CMD_TABLE_ATTR:
|
||||||
@@ -6300,9 +6307,12 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba, u32 intr_status)
|
|||||||
if (hba->errors & UIC_ERROR) {
|
if (hba->errors & UIC_ERROR) {
|
||||||
hba->uic_error = 0;
|
hba->uic_error = 0;
|
||||||
retval = ufshcd_update_uic_error(hba);
|
retval = ufshcd_update_uic_error(hba);
|
||||||
if (hba->uic_error)
|
if (hba->uic_error) {
|
||||||
|
dev_err(hba->dev,
|
||||||
|
"Scheduling error handler because of an UIC error\n");
|
||||||
queue_eh_work = true;
|
queue_eh_work = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (hba->errors & UFSHCD_UIC_HIBERN8_MASK) {
|
if (hba->errors & UFSHCD_UIC_HIBERN8_MASK) {
|
||||||
dev_err(hba->dev,
|
dev_err(hba->dev,
|
||||||
|
Reference in New Issue
Block a user