Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316835
b: refs/heads/master
c: 94c122a
h: refs/heads/master
i:
  316833: 642c3b5
  316831: 799d61e
v: v3
  • Loading branch information
Namjae Jeon authored and James Bottomley committed Jul 20, 2012
1 parent 2681770 commit f815c5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73ec513a3b1fa89d3cbaf0bc7dcc3a2b67936f2a
refs/heads/master: 94c122ab01f84332c371dc4ae0f5b70e879173d6
10 changes: 6 additions & 4 deletions trunk/drivers/scsi/ufs/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ static int ufshcd_task_req_compl(struct ufs_hba *hba, u32 index)
if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL &&
task_result != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED)
task_result = FAILED;
else
task_result = SUCCESS;
} else {
task_result = FAILED;
dev_err(&hba->pdev->dev,
Expand Down Expand Up @@ -1556,7 +1558,7 @@ ufshcd_issue_tm_cmd(struct ufs_hba *hba,
goto out;
}
clear_bit(free_slot, &hba->tm_condition);
return ufshcd_task_req_compl(hba, free_slot);
err = ufshcd_task_req_compl(hba, free_slot);
out:
return err;
}
Expand All @@ -1580,7 +1582,7 @@ static int ufshcd_device_reset(struct scsi_cmnd *cmd)
tag = cmd->request->tag;

err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_LOGICAL_RESET);
if (err)
if (err == FAILED)
goto out;

for (pos = 0; pos < hba->nutrs; pos++) {
Expand Down Expand Up @@ -1620,7 +1622,7 @@ static int ufshcd_host_reset(struct scsi_cmnd *cmd)
if (hba->ufshcd_state == UFSHCD_STATE_RESET)
return SUCCESS;

return (ufshcd_do_reset(hba) == SUCCESS) ? SUCCESS : FAILED;
return ufshcd_do_reset(hba);
}

/**
Expand Down Expand Up @@ -1652,7 +1654,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
spin_unlock_irqrestore(host->host_lock, flags);

err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_ABORT_TASK);
if (err)
if (err == FAILED)
goto out;

scsi_dma_unmap(cmd);
Expand Down

0 comments on commit f815c5a

Please sign in to comment.