Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254371
b: refs/heads/master
c: aa14510
h: refs/heads/master
i:
  254369: 8e08e3b
  254367: 1375e7e
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed Jul 3, 2011
1 parent 36aa0a7 commit c7a5223
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50e7f9b5a9ae4a763b2c27500807cf237faca9b0
refs/heads/master: aa14510295d3d87431c915c0b2bc5dd3af7f2c35
28 changes: 16 additions & 12 deletions trunk/drivers/scsi/isci/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,11 +809,11 @@ static void isci_task_save_for_upper_layer_completion(

/* Normal notification (task_done) */
dev_dbg(&host->pdev->dev,
"%s: Normal - task = %p, response=%d, status=%d\n",
"%s: Normal - task = %p, response=%d (%d), status=%d (%d)\n",
__func__,
task,
response,
status);
task->task_status.resp, response,
task->task_status.stat, status);
/* Add to the completed list. */
list_add(&request->completed_node,
&host->requests_to_complete);
Expand All @@ -827,11 +827,11 @@ static void isci_task_save_for_upper_layer_completion(
* already in the abort path.
*/
dev_warn(&host->pdev->dev,
"%s: Aborted - task = %p, response=%d, status=%d\n",
"%s: Aborted - task = %p, response=%d (%d), status=%d (%d)\n",
__func__,
task,
response,
status);
task->task_status.resp, response,
task->task_status.stat, status);

/* Wake up whatever process was waiting for this
* request to complete.
Expand All @@ -850,23 +850,23 @@ static void isci_task_save_for_upper_layer_completion(
case isci_perform_error_io_completion:
/* Use sas_task_abort */
dev_warn(&host->pdev->dev,
"%s: Error - task = %p, response=%d, status=%d\n",
"%s: Error - task = %p, response=%d (%d), status=%d (%d)\n",
__func__,
task,
response,
status);
task->task_status.resp, response,
task->task_status.stat, status);
/* Add to the aborted list. */
list_add(&request->completed_node,
&host->requests_to_errorback);
break;

default:
dev_warn(&host->pdev->dev,
"%s: Unknown - task = %p, response=%d, status=%d\n",
"%s: Unknown - task = %p, response=%d (%d), status=%d (%d)\n",
__func__,
task,
response,
status);
task->task_status.resp, response,
task->task_status.stat, status);

/* Add to the error to libsas list. */
list_add(&request->completed_node,
Expand Down Expand Up @@ -1165,6 +1165,10 @@ void isci_request_io_request_complete(
task->task_state_flags |= SAS_TASK_NEED_DEV_RESET;
spin_unlock_irqrestore(&task->task_state_lock, task_flags);

/* Fail the I/O. */
response = SAS_TASK_UNDELIVERED;
status = SAM_STAT_TASK_ABORTED;

complete_to_host = isci_perform_error_io_completion;
request->complete_in_target = false;
break;
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/scsi/isci/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,19 @@ isci_task_set_completion_status(

spin_lock_irqsave(&task->task_state_lock, flags);

task->task_status.resp = response;
task->task_status.stat = status;

/* If a device reset is being indicated, make sure the I/O
* is in the error path.
*/
if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET)
if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET) {

/* Fail the I/O to make sure it goes into the error path. */
response = SAS_TASK_UNDELIVERED;
status = SAM_STAT_TASK_ABORTED;

task_notification_selection = isci_perform_error_io_completion;
}
task->task_status.resp = response;
task->task_status.stat = status;

switch (task_notification_selection) {

Expand Down

0 comments on commit c7a5223

Please sign in to comment.