Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302566
b: refs/heads/master
c: 447bfbc
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed May 17, 2012
1 parent 0be7f51 commit 3f0833c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 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: e3c84dfdb8f4c675b0ba5cf3fa252dc4056b7ddd
refs/heads/master: 447bfbcee070a0b43dd6abc743063d7a02fe65ca
6 changes: 2 additions & 4 deletions trunk/drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@ const char *dev_state_name(enum sci_remote_device_states state)
static enum sci_status sci_remote_device_suspend(struct isci_remote_device *idev,
enum sci_remote_node_suspension_reasons reason)
{
return sci_remote_node_context_suspend(&idev->rnc,
reason,
SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT,
NULL, NULL);
return sci_remote_node_context_suspend(&idev->rnc, reason,
SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT);
}

/**
Expand Down
16 changes: 7 additions & 9 deletions trunk/drivers/scsi/isci/remote_node_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ static void sci_remote_node_context_ready_state_enter(struct sci_base_state_mach
if ((dest_select == RNC_DEST_SUSPENDED) ||
(dest_select == RNC_DEST_SUSPENDED_RESUME)) {
sci_remote_node_context_suspend(
rnc, SCI_SW_SUSPEND_NORMAL,
SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT, NULL, NULL);
rnc, rnc->suspend_reason,
SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT);

if (dest_select == RNC_DEST_SUSPENDED_RESUME) {
sci_remote_node_context_resume(rnc, usr_cb, usr_param);
Expand Down Expand Up @@ -539,9 +539,7 @@ enum sci_status sci_remote_node_context_destruct(struct sci_remote_node_context
enum sci_status sci_remote_node_context_suspend(
struct sci_remote_node_context *sci_rnc,
enum sci_remote_node_suspension_reasons suspend_reason,
u32 suspend_type,
scics_sds_remote_node_context_callback cb_fn,
void *cb_p)
u32 suspend_type)
{
enum scis_sds_remote_node_context_states state
= sci_rnc->sm.current_state_id;
Expand Down Expand Up @@ -581,6 +579,8 @@ enum sci_status sci_remote_node_context_suspend(
* needs to be done immediately.
*/
sci_rnc->destination_state = RNC_DEST_SUSPENDED;
sci_rnc->suspend_type = suspend_type;
sci_rnc->suspend_reason = suspend_reason;
return SCI_SUCCESS;

case SCI_RNC_TX_SUSPENDED:
Expand All @@ -603,14 +603,12 @@ enum sci_status sci_remote_node_context_suspend(
return SCI_FAILURE_INVALID_STATE;
}
sci_rnc->destination_state = dest_param;
sci_rnc->user_callback = cb_fn;
sci_rnc->user_cookie = cb_p;
sci_rnc->suspend_type = suspend_type;
sci_rnc->suspend_type = suspend_type;
sci_rnc->suspend_reason = suspend_reason;

if (status == SCI_SUCCESS) { /* Already in the destination state? */
struct isci_host *ihost = idev->owning_port->owning_controller;

sci_remote_node_context_notify_user(sci_rnc);
wake_up_all(&ihost->eventq); /* Let observers look. */
return SCI_SUCCESS;
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/scsi/isci/remote_node_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ struct sci_remote_node_context {
* context suspension.
*/
u32 suspend_type;
enum sci_remote_node_suspension_reasons suspend_reason;

/**
* This field is true if the remote node context is resuming from its current
Expand Down Expand Up @@ -209,9 +210,7 @@ enum sci_status sci_remote_node_context_destruct(struct sci_remote_node_context
void *callback_parameter);
enum sci_status sci_remote_node_context_suspend(struct sci_remote_node_context *sci_rnc,
u32 suspend_type,
u32 suspension_code,
scics_sds_remote_node_context_callback cb_fn,
void *cb_p);
u32 suspension_code);
enum sci_status sci_remote_node_context_resume(struct sci_remote_node_context *sci_rnc,
scics_sds_remote_node_context_callback cb_fn,
void *cb_p);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/isci/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -2382,8 +2382,7 @@ static void sci_request_handle_suspending_completions(
&ireq->target_device->rnc,
SCI_HW_SUSPEND,
(is_tx_rx) ? SCU_EVENT_TL_RNC_SUSPEND_TX_RX
: SCU_EVENT_TL_RNC_SUSPEND_TX,
NULL, NULL);
: SCU_EVENT_TL_RNC_SUSPEND_TX);
}
}

Expand Down

0 comments on commit 3f0833c

Please sign in to comment.