diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 48b01fe0b9ba..58f4ba6fe412 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -1163,6 +1163,8 @@ static int ufshcd_task_req_compl(struct ufs_hba *hba, u32 index) | |||
1163 | if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL && | 1163 | if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL && |
1164 | task_result != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED) | 1164 | task_result != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED) |
1165 | task_result = FAILED; | 1165 | task_result = FAILED; |
1166 | else | ||
1167 | task_result = SUCCESS; | ||
1166 | } else { | 1168 | } else { |
1167 | task_result = FAILED; | 1169 | task_result = FAILED; |
1168 | dev_err(&hba->pdev->dev, | 1170 | dev_err(&hba->pdev->dev, |
@@ -1556,7 +1558,7 @@ ufshcd_issue_tm_cmd(struct ufs_hba *hba, | |||
1556 | goto out; | 1558 | goto out; |
1557 | } | 1559 | } |
1558 | clear_bit(free_slot, &hba->tm_condition); | 1560 | clear_bit(free_slot, &hba->tm_condition); |
1559 | return ufshcd_task_req_compl(hba, free_slot); | 1561 | err = ufshcd_task_req_compl(hba, free_slot); |
1560 | out: | 1562 | out: |
1561 | return err; | 1563 | return err; |
1562 | } | 1564 | } |
@@ -1580,7 +1582,7 @@ static int ufshcd_device_reset(struct scsi_cmnd *cmd) | |||
1580 | tag = cmd->request->tag; | 1582 | tag = cmd->request->tag; |
1581 | 1583 | ||
1582 | err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_LOGICAL_RESET); | 1584 | err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_LOGICAL_RESET); |
1583 | if (err) | 1585 | if (err == FAILED) |
1584 | goto out; | 1586 | goto out; |
1585 | 1587 | ||
1586 | for (pos = 0; pos < hba->nutrs; pos++) { | 1588 | for (pos = 0; pos < hba->nutrs; pos++) { |
@@ -1620,7 +1622,7 @@ static int ufshcd_host_reset(struct scsi_cmnd *cmd) | |||
1620 | if (hba->ufshcd_state == UFSHCD_STATE_RESET) | 1622 | if (hba->ufshcd_state == UFSHCD_STATE_RESET) |
1621 | return SUCCESS; | 1623 | return SUCCESS; |
1622 | 1624 | ||
1623 | return (ufshcd_do_reset(hba) == SUCCESS) ? SUCCESS : FAILED; | 1625 | return ufshcd_do_reset(hba); |
1624 | } | 1626 | } |
1625 | 1627 | ||
1626 | /** | 1628 | /** |
@@ -1652,7 +1654,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) | |||
1652 | spin_unlock_irqrestore(host->host_lock, flags); | 1654 | spin_unlock_irqrestore(host->host_lock, flags); |
1653 | 1655 | ||
1654 | err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_ABORT_TASK); | 1656 | err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_ABORT_TASK); |
1655 | if (err) | 1657 | if (err == FAILED) |
1656 | goto out; | 1658 | goto out; |
1657 | 1659 | ||
1658 | scsi_dma_unmap(cmd); | 1660 | scsi_dma_unmap(cmd); |