aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.c
diff options
context:
space:
mode:
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,