Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254366
b: refs/heads/master
c: cbb65c6
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed Jul 3, 2011
1 parent 6e4d585 commit a955eee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: f0846c68912545d70da16b2fbedded37ea4394d8
refs/heads/master: cbb65c665b341e560b7a3b37cc616376031b3ee5
20 changes: 11 additions & 9 deletions trunk/drivers/scsi/isci/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,9 @@ static void isci_request_cleanup_completed_loiterer(
static void isci_terminate_request_core(
struct isci_host *isci_host,
struct isci_remote_device *isci_device,
struct isci_request *isci_request,
struct completion *request_completion)
struct isci_request *isci_request)
{
enum sci_status status = SCI_SUCCESS;
enum sci_status status = SCI_SUCCESS;
bool was_terminated = false;
bool needs_cleanup_handling = false;
enum isci_request_status request_status;
Expand Down Expand Up @@ -720,6 +719,7 @@ static void isci_terminate_request_core(
*/
if (isci_request->sci_request_handle != NULL) {
was_terminated = true;
needs_cleanup_handling = true;
status = scic_controller_terminate_request(
isci_host->core_controller,
to_sci_dev(isci_device),
Expand All @@ -744,23 +744,26 @@ static void isci_terminate_request_core(
dev_dbg(&isci_host->pdev->dev,
"%s: before completion wait (%p)\n",
__func__,
request_completion);
isci_request->io_request_completion);

/* Wait here for the request to complete. */
wait_for_completion(request_completion);
wait_for_completion(isci_request->io_request_completion);

dev_dbg(&isci_host->pdev->dev,
"%s: after completion wait (%p)\n",
__func__,
request_completion);
isci_request->io_request_completion);
}

if (needs_cleanup_handling)
isci_request_cleanup_completed_loiterer(
isci_host, isci_device, isci_request
);
}
/* Clear the completion pointer from the request. */
isci_request->io_request_completion = NULL;
}

static void isci_terminate_request(
struct isci_host *isci_host,
struct isci_remote_device *isci_device,
Expand Down Expand Up @@ -800,7 +803,7 @@ static void isci_terminate_request(
* request and potentially calling up to libsas.
*/
isci_terminate_request_core(isci_host, isci_device,
isci_request, &request_completion);
isci_request);
}
}

Expand Down Expand Up @@ -1268,8 +1271,7 @@ int isci_task_abort_task(struct sas_task *task)
/* Clean up the request on our side, and wait for the aborted I/O to
* complete.
*/
isci_terminate_request_core(isci_host, isci_device, old_request,
&aborted_io_completion);
isci_terminate_request_core(isci_host, isci_device, old_request);
}

/* Make sure we do not leave a reference to aborted_io_completion */
Expand Down

0 comments on commit a955eee

Please sign in to comment.