提交 960e9648 编写于 作者: B Brian King 提交者: Martin K. Petersen

scsi: ipr: Remove redundant initialization

Removes some code in __ipr_eh_dev_reset which was modifying the ipr_cmd
done function. This should have already been setup at command allocation
time and if its since been changed, it means we are in the ipr_erp*
functions and need to wait for them to complete and don't want to
override that here.
Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
Reviewed-by: NWendy Xiong <wenxiong@linux.vnet.ibm.com>
Tested-by: NWendy Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 66a0d59c
...@@ -5243,12 +5243,11 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd *scsi_cmd) ...@@ -5243,12 +5243,11 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd *scsi_cmd)
spin_lock(&hrrq->_lock); spin_lock(&hrrq->_lock);
list_for_each_entry(ipr_cmd, &hrrq->hrrq_pending_q, queue) { list_for_each_entry(ipr_cmd, &hrrq->hrrq_pending_q, queue) {
if (ipr_cmd->ioarcb.res_handle == res->res_handle) { if (ipr_cmd->ioarcb.res_handle == res->res_handle) {
if (ipr_cmd->scsi_cmd) if (!ipr_cmd->qc)
ipr_cmd->done = ipr_scsi_eh_done; continue;
if (ipr_cmd->qc)
ipr_cmd->done = ipr_sata_eh_done; ipr_cmd->done = ipr_sata_eh_done;
if (ipr_cmd->qc && if (!(ipr_cmd->qc->flags & ATA_QCFLAG_FAILED)) {
!(ipr_cmd->qc->flags & ATA_QCFLAG_FAILED)) {
ipr_cmd->qc->err_mask |= AC_ERR_TIMEOUT; ipr_cmd->qc->err_mask |= AC_ERR_TIMEOUT;
ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED; ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册