aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/task.c
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-09 01:41:55 -0500
committerDan Williams <dan.j.williams@intel.com>2012-05-17 17:33:39 -0400
commit637325028f3a9e9cf411ede96063997611f976e4 (patch)
tree56e9dc922a1ed8c22cb114cbfc9ee58bd324af93 /drivers/scsi/isci/task.c
parent59e35396436c564b5019e1a70073900bc3e19f4f (diff)
isci: Device access in the error path does not depend on IDEV_GONE.
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/task.c')
-rw-r--r--drivers/scsi/isci/task.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 29ce8815e799..9d8720d6266c 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -427,7 +427,7 @@ int isci_task_lu_reset(struct domain_device *dev, u8 *lun)
427 int ret; 427 int ret;
428 428
429 spin_lock_irqsave(&ihost->scic_lock, flags); 429 spin_lock_irqsave(&ihost->scic_lock, flags);
430 idev = isci_lookup_device(dev); 430 idev = isci_get_device(dev->lldd_dev);
431 spin_unlock_irqrestore(&ihost->scic_lock, flags); 431 spin_unlock_irqrestore(&ihost->scic_lock, flags);
432 432
433 dev_dbg(&ihost->pdev->dev, 433 dev_dbg(&ihost->pdev->dev,
@@ -507,7 +507,7 @@ int isci_task_abort_task(struct sas_task *task)
507 if (!(task->task_state_flags & SAS_TASK_STATE_DONE) && 507 if (!(task->task_state_flags & SAS_TASK_STATE_DONE) &&
508 (task->task_state_flags & SAS_TASK_AT_INITIATOR) && 508 (task->task_state_flags & SAS_TASK_AT_INITIATOR) &&
509 old_request) 509 old_request)
510 idev = isci_lookup_device(task->dev); 510 idev = isci_get_device(task->dev->lldd_dev);
511 511
512 spin_unlock(&task->task_state_lock); 512 spin_unlock(&task->task_state_lock);
513 spin_unlock_irqrestore(&ihost->scic_lock, flags); 513 spin_unlock_irqrestore(&ihost->scic_lock, flags);
@@ -593,6 +593,9 @@ int isci_task_abort_task(struct sas_task *task)
593 ISCI_ABORT_TASK_TIMEOUT_MS); 593 ISCI_ABORT_TASK_TIMEOUT_MS);
594 } 594 }
595out: 595out:
596 dev_warn(&ihost->pdev->dev,
597 "%s: Done; dev = %p, task = %p , old_request == %p\n",
598 __func__, idev, task, old_request);
596 isci_put_device(idev); 599 isci_put_device(idev);
597 return ret; 600 return ret;
598} 601}