diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-03-31 13:10:40 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:00:36 -0700 |
commit | ed8a72d108bd951909b28fa4a89aad6489f414e1 (patch) | |
tree | d93a624b0677c756c77a2bf3846b69f6209221e8 /drivers/scsi/isci/task.c | |
parent | 26e953bc6ec11c9e81ad8e9a59b14cf260776007 (diff) | |
download | blackbird-op-linux-ed8a72d108bd951909b28fa4a89aad6489f414e1.tar.gz blackbird-op-linux-ed8a72d108bd951909b28fa4a89aad6489f414e1.zip |
isci: Qualify when the host lock is managed for STP/SATA callbacks.
In the case of internal discovery related STP/SATA I/O started
through sas_execute_task the host lock is not taken by libsas before
calling lldd_execute_task, so the lock should not be managed before
calling back to libsas through task->task_done or sas_task_abort.
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.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 338f08ec4d8e..5bcea60fd8c4 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c @@ -55,7 +55,6 @@ #include <linux/completion.h> #include <linux/irqflags.h> -#include <scsi/sas_ata.h> #include "scic_task_request.h" #include "scic_remote_device.h" #include "scic_io_request.h" @@ -93,26 +92,13 @@ static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task, case isci_perform_normal_io_completion: /* Normal notification (task_done) */ dev_dbg(&ihost->pdev->dev, - "%s: Normal - task = %p, response=%d, status=%d\n", + "%s: Normal - task = %p, response=%d, " + "status=%d\n", __func__, task, response, status); task->lldd_task = NULL; - if (dev_is_sata(task->dev)) { - /* Since we are still in the submit path, and since - * libsas takes the host lock on behalf of SATA - * devices before I/O starts, we need to unlock - * before we can call back and report the I/O - * submission error. - */ - unsigned long flags; - raw_local_irq_save(flags); - spin_unlock(ihost->shost->host_lock); - task->task_done(task); - spin_lock(ihost->shost->host_lock); - raw_local_irq_restore(flags); - } else - task->task_done(task); + isci_execpath_callback(ihost, task, task->task_done); break; case isci_perform_aborted_io_completion: @@ -120,16 +106,19 @@ static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task, * abort path. */ dev_warn(&ihost->pdev->dev, - "%s: Aborted - task = %p, response=%d, status=%d\n", + "%s: Aborted - task = %p, response=%d, " + "status=%d\n", __func__, task, response, status); break; case isci_perform_error_io_completion: /* Use sas_task_abort */ dev_warn(&ihost->pdev->dev, - "%s: Error - task = %p, response=%d, status=%d\n", + "%s: Error - task = %p, response=%d, " + "status=%d\n", __func__, task, response, status); - sas_task_abort(task); + + isci_execpath_callback(ihost, task, sas_task_abort); break; default: |