mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 11:21:51 +00:00
[SCSI] isci: Immediately fail I/O to removed devices.
In the case where an I/O fails to start in isci_request_execute, only allow retries if the device is not already gone. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
0e2e27990e
commit
c2cb8a5fd7
1 changed files with 21 additions and 10 deletions
|
@ -212,16 +212,27 @@ int isci_task_execute_task(struct sas_task *task, int num, gfp_t gfp_flags)
|
||||||
task->task_state_flags &= ~SAS_TASK_AT_INITIATOR;
|
task->task_state_flags &= ~SAS_TASK_AT_INITIATOR;
|
||||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||||
|
|
||||||
/* Indicate QUEUE_FULL so that the scsi
|
if (test_bit(IDEV_GONE, &idev->flags)) {
|
||||||
* midlayer retries. if the request
|
|
||||||
* failed for remote device reasons,
|
/* Indicate that the device
|
||||||
* it gets returned as
|
* is gone.
|
||||||
* SAS_TASK_UNDELIVERED next time
|
*/
|
||||||
* through.
|
isci_task_refuse(ihost, task,
|
||||||
*/
|
SAS_TASK_UNDELIVERED,
|
||||||
isci_task_refuse(ihost, task,
|
SAS_DEVICE_UNKNOWN);
|
||||||
SAS_TASK_COMPLETE,
|
} else {
|
||||||
SAS_QUEUE_FULL);
|
/* Indicate QUEUE_FULL so that
|
||||||
|
* the scsi midlayer retries.
|
||||||
|
* If the request failed for
|
||||||
|
* remote device reasons, it
|
||||||
|
* gets returned as
|
||||||
|
* SAS_TASK_UNDELIVERED next
|
||||||
|
* time through.
|
||||||
|
*/
|
||||||
|
isci_task_refuse(ihost, task,
|
||||||
|
SAS_TASK_COMPLETE,
|
||||||
|
SAS_QUEUE_FULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue