summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.c
diff options
context:
space:
mode:
authorJeff Skirvin2011-03-31 22:10:40 +0200
committerDan Williams2011-07-03 13:00:36 +0200
commited8a72d108bd951909b28fa4a89aad6489f414e1 (patch)
treed93a624b0677c756c77a2bf3846b69f6209221e8 /drivers/scsi/isci/request.c
parentisci: Fix use of SATA soft reset state machine. (diff)
downloadkernel-qcow2-linux-ed8a72d108bd951909b28fa4a89aad6489f414e1.tar.gz
kernel-qcow2-linux-ed8a72d108bd951909b28fa4a89aad6489f414e1.tar.xz
kernel-qcow2-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/request.c')
-rw-r--r--drivers/scsi/isci/request.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 946caaeb66c6..b519373597a5 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -53,7 +53,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <scsi/sas_ata.h>
#include "isci.h"
#include "scic_remote_device.h"
#include "scic_io_request.h"
@@ -452,22 +451,11 @@ int isci_request_execute(
task->task_state_flags |= SAS_TASK_NEED_DEV_RESET;
spin_unlock_irqrestore(&task->task_state_lock, flags);
- /* Cause this task to be scheduled in the SCSI error handler
- * thread.
+ /* Cause this task to be scheduled in the SCSI error
+ * handler thread.
*/
- 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 put the task in the error path.
- */
- raw_local_irq_save(flags);
- spin_unlock(isci_host->shost->host_lock);
- sas_task_abort(task);
- spin_lock(isci_host->shost->host_lock);
- raw_local_irq_restore(flags);
- } else
- sas_task_abort(task);
+ isci_execpath_callback(isci_host, task,
+ sas_task_abort);
/* Change the status, since we are holding
* the I/O until it is managed by the SCSI