aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/task.h')
-rw-r--r--drivers/scsi/isci/task.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index b84bedd94601..9754b43f5b0b 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -306,7 +306,6 @@ isci_task_set_completion_status(
306 * is in the error path. 306 * is in the error path.
307 */ 307 */
308 if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET) { 308 if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET) {
309
310 /* Fail the I/O to make sure it goes into the error path. */ 309 /* Fail the I/O to make sure it goes into the error path. */
311 response = SAS_TASK_UNDELIVERED; 310 response = SAS_TASK_UNDELIVERED;
312 status = SAM_STAT_TASK_ABORTED; 311 status = SAM_STAT_TASK_ABORTED;
@@ -317,28 +316,25 @@ isci_task_set_completion_status(
317 task->task_status.stat = status; 316 task->task_status.stat = status;
318 317
319 switch (task_notification_selection) { 318 switch (task_notification_selection) {
320 319 case isci_perform_aborted_io_completion:
321 case isci_perform_aborted_io_completion: 320 /* This path can occur with task-managed requests as well as
322 /* This path can occur with task-managed requests as well as 321 * requests terminated because of LUN or device resets.
323 * requests terminated because of LUN or device resets. 322 */
324 */ 323 /* Fall through to the normal case... */
325 /* Fall through to the normal case... */ 324 case isci_perform_normal_io_completion:
326 325 /* Normal notification (task_done) */
327 case isci_perform_normal_io_completion: 326 isci_set_task_doneflags(task);
328 /* Normal notification (task_done) */ 327 break;
329 isci_set_task_doneflags(task); 328 default:
330 break; 329 WARN_ONCE(1, "unknown task_notification_selection: %d\n",
331 330 task_notification_selection);
332 default: 331 /* Fall through to the error case... */
333 WARN_ON(FALSE); 332 case isci_perform_error_io_completion:
334 /* Fall through to the error case... */ 333 /* Use sas_task_abort */
335 334 /* Leave SAS_TASK_STATE_DONE clear
336 case isci_perform_error_io_completion: 335 * Leave SAS_TASK_AT_INITIATOR set.
337 /* Use sas_task_abort */ 336 */
338 /* Leave SAS_TASK_STATE_DONE clear 337 break;
339 * Leave SAS_TASK_AT_INITIATOR set.
340 */
341 break;
342 } 338 }
343 339
344 spin_unlock_irqrestore(&task->task_state_lock, flags); 340 spin_unlock_irqrestore(&task->task_state_lock, flags);