Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302556
b: refs/heads/master
c: 8388401
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed May 17, 2012
1 parent 769ab7e commit 6874396
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 23ec2aa947e83d0a172220f361166b8224875221
refs/heads/master: 83884014eaaa68834ced39d1c75f1bc20d618ec0
23 changes: 11 additions & 12 deletions trunk/drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,15 @@ enum sci_status sci_remote_device_stop(struct isci_remote_device *idev,
case SCI_SMP_DEV_IDLE:
case SCI_SMP_DEV_CMD:
sci_change_state(sm, SCI_DEV_STOPPING);
if (idev->started_request_count == 0) {
if (idev->started_request_count == 0)
sci_remote_node_context_destruct(&idev->rnc,
rnc_destruct_done, idev);
return SCI_SUCCESS;
} else
return sci_remote_device_terminate_requests(idev);
break;
rnc_destruct_done,
idev);
else {
sci_remote_device_suspend(idev);
sci_remote_device_terminate_requests(idev);
}
return SCI_SUCCESS;
case SCI_DEV_STOPPING:
/* All requests should have been terminated, but if there is an
* attempt to stop a device already in the stopping state, then
Expand Down Expand Up @@ -1403,14 +1405,8 @@ enum sci_status isci_remote_device_stop(struct isci_host *ihost, struct isci_rem
spin_lock_irqsave(&ihost->scic_lock, flags);
idev->domain_dev->lldd_dev = NULL; /* disable new lookups */
set_bit(IDEV_GONE, &idev->flags);
spin_unlock_irqrestore(&ihost->scic_lock, flags);

/* Kill all outstanding requests. */
isci_remote_device_nuke_requests(ihost, idev);

set_bit(IDEV_STOP_PENDING, &idev->flags);

spin_lock_irqsave(&ihost->scic_lock, flags);
status = sci_remote_device_stop(idev, 50);
spin_unlock_irqrestore(&ihost->scic_lock, flags);

Expand All @@ -1420,6 +1416,9 @@ enum sci_status isci_remote_device_stop(struct isci_host *ihost, struct isci_rem
else
wait_for_device_stop(ihost, idev);

dev_dbg(&ihost->pdev->dev,
"%s: isci_device = %p, waiting done.\n", __func__, idev);

return status;
}

Expand Down

0 comments on commit 6874396

Please sign in to comment.