aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.c
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-06-23 20:09:02 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:51 -0400
commit9274f45ea551421cd3bf329de9dd8d1e6208285a (patch)
tree25e21494d3c74a5b2965485f2d76c541d49cc68b /drivers/scsi/isci/request.c
parent4cffe13e0dfd00f90c86b0153c751dab61a1bf1d (diff)
isci: Terminate dev requests on FIS err bit rx in NCQ
When the remote device transitions to a not-ready state because of an NCQ error condition, all outstanding requests to that device are terminated and completed to libsas on the normal path. The device then waits for a READ LOG EXT command to issue on the task management path. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r--drivers/scsi/isci/request.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 1043fed2a40a..08a7340b33bf 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -3587,9 +3587,30 @@ int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *ide
3587 3587
3588 spin_lock_irqsave(&ihost->scic_lock, flags); 3588 spin_lock_irqsave(&ihost->scic_lock, flags);
3589 3589
3590 /* send the request, let the core assign the IO TAG. */ 3590 if (test_bit(IDEV_IO_NCQERROR, &idev->flags)) {
3591 status = scic_controller_start_io(&ihost->sci, &idev->sci, &ireq->sci, 3591
3592 SCI_CONTROLLER_INVALID_IO_TAG); 3592 if (isci_task_is_ncq_recovery(task)) {
3593
3594 /* The device is in an NCQ recovery state. Issue the
3595 * request on the task side. Note that it will
3596 * complete on the I/O request side because the
3597 * request was built that way (ie.
3598 * ireq->is_task_management_request is false).
3599 */
3600 status = scic_controller_start_task(&ihost->sci,
3601 &idev->sci,
3602 &ireq->sci,
3603 SCI_CONTROLLER_INVALID_IO_TAG);
3604 } else {
3605 status = SCI_FAILURE;
3606 }
3607 } else {
3608
3609 /* send the request, let the core assign the IO TAG. */
3610 status = scic_controller_start_io(&ihost->sci, &idev->sci,
3611 &ireq->sci,
3612 SCI_CONTROLLER_INVALID_IO_TAG);
3613 }
3593 if (status != SCI_SUCCESS && 3614 if (status != SCI_SUCCESS &&
3594 status != SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) { 3615 status != SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) {
3595 dev_warn(&ihost->pdev->dev, 3616 dev_warn(&ihost->pdev->dev,