Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254561
b: refs/heads/master
c: 086a0da
h: refs/heads/master
i:
  254559: d0c8659
v: v3
  • Loading branch information
Dan Williams committed Jul 3, 2011
1 parent 60f510b commit e8b2bd7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 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: e9bf709564e90abea25ca7aeae8c3de5cc6468d7
refs/heads/master: 086a0dabc5bf154e13604a6d71e2d051207f9718
20 changes: 8 additions & 12 deletions trunk/drivers/scsi/isci/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ int isci_task_execute_tmf(struct isci_host *ihost,
status,
ireq);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
goto cleanup_request;
isci_request_free(ihost, ireq);
return ret;
}

if (tmf->cb_state_func != NULL)
Expand All @@ -354,19 +355,21 @@ int isci_task_execute_tmf(struct isci_host *ihost,

/* Wait for the TMF to complete, or a timeout. */
timeleft = wait_for_completion_timeout(&completion,
jiffies + msecs_to_jiffies(timeout_ms));
msecs_to_jiffies(timeout_ms));

if (timeleft == 0) {
spin_lock_irqsave(&ihost->scic_lock, flags);

if (tmf->cb_state_func != NULL)
tmf->cb_state_func(isci_tmf_timed_out, tmf, tmf->cb_data);

status = scic_controller_terminate_request(&ihost->sci,
&isci_device->sci,
&ireq->sci);
scic_controller_terminate_request(&ihost->sci,
&isci_device->sci,
&ireq->sci);

spin_unlock_irqrestore(&ihost->scic_lock, flags);

wait_for_completion(tmf->complete);
}

isci_print_tmf(tmf);
Expand All @@ -387,13 +390,6 @@ int isci_task_execute_tmf(struct isci_host *ihost,
__func__,
ireq);

if (ireq->io_request_completion != NULL) {
/* A thread is waiting for this TMF to finish. */
complete(ireq->io_request_completion);
}

cleanup_request:
isci_request_free(ihost, ireq);
return ret;
}

Expand Down

0 comments on commit e8b2bd7

Please sign in to comment.