aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/task.c')
-rw-r--r--drivers/scsi/isci/task.c29
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 @@
55 55
56#include <linux/completion.h> 56#include <linux/completion.h>
57#include <linux/irqflags.h> 57#include <linux/irqflags.h>
58#include <scsi/sas_ata.h>
59#include "scic_task_request.h" 58#include "scic_task_request.h"
60#include "scic_remote_device.h" 59#include "scic_remote_device.h"
61#include "scic_io_request.h" 60#include "scic_io_request.h"
@@ -93,26 +92,13 @@ static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task,
93 case isci_perform_normal_io_completion: 92 case isci_perform_normal_io_completion:
94 /* Normal notification (task_done) */ 93 /* Normal notification (task_done) */
95 dev_dbg(&ihost->pdev->dev, 94 dev_dbg(&ihost->pdev->dev,
96 "%s: Normal - task = %p, response=%d, status=%d\n", 95 "%s: Normal - task = %p, response=%d, "
96 "status=%d\n",
97 __func__, task, response, status); 97 __func__, task, response, status);
98 98
99 task->lldd_task = NULL; 99 task->lldd_task = NULL;
100 if (dev_is_sata(task->dev)) {
101 /* Since we are still in the submit path, and since
102 * libsas takes the host lock on behalf of SATA
103 * devices before I/O starts, we need to unlock
104 * before we can call back and report the I/O
105 * submission error.
106 */
107 unsigned long flags;
108 100
109 raw_local_irq_save(flags); 101 isci_execpath_callback(ihost, task, task->task_done);
110 spin_unlock(ihost->shost->host_lock);
111 task->task_done(task);
112 spin_lock(ihost->shost->host_lock);
113 raw_local_irq_restore(flags);
114 } else
115 task->task_done(task);
116 break; 102 break;
117 103
118 case isci_perform_aborted_io_completion: 104 case isci_perform_aborted_io_completion:
@@ -120,16 +106,19 @@ static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task,
120 * abort path. 106 * abort path.
121 */ 107 */
122 dev_warn(&ihost->pdev->dev, 108 dev_warn(&ihost->pdev->dev,
123 "%s: Aborted - task = %p, response=%d, status=%d\n", 109 "%s: Aborted - task = %p, response=%d, "
110 "status=%d\n",
124 __func__, task, response, status); 111 __func__, task, response, status);
125 break; 112 break;
126 113
127 case isci_perform_error_io_completion: 114 case isci_perform_error_io_completion:
128 /* Use sas_task_abort */ 115 /* Use sas_task_abort */
129 dev_warn(&ihost->pdev->dev, 116 dev_warn(&ihost->pdev->dev,
130 "%s: Error - task = %p, response=%d, status=%d\n", 117 "%s: Error - task = %p, response=%d, "
118 "status=%d\n",
131 __func__, task, response, status); 119 __func__, task, response, status);
132 sas_task_abort(task); 120
121 isci_execpath_callback(ihost, task, sas_task_abort);
133 break; 122 break;
134 123
135 default: 124 default: