aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-09 01:42:04 -0500
committerDan Williams <dan.j.williams@intel.com>2012-05-17 17:33:41 -0400
commitd76689e46c8b2180c08575adc830cfda890ceb87 (patch)
tree16788cf746428daf83bd6fd03c039e51af2bc05e /drivers/scsi/isci
parent621120ca56850249554996c94efe75f8200a2cc0 (diff)
isci: Fix RNC suspend call for SCI_RESUMING state.
Instead of immediately transitioning to the SCI_RNC_AWAIT_SUSPENSION state, handle the SCI_RNC_RESUMING suspend transition from the SCI_RNC_READY state like the SCI_RNC_INVALIDATING --> SCI_RNC_POSTING transitions do now, by setting the destination state for the entry into the READY state. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/remote_node_context.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
index faeae9554ee3..b698081ce2dd 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -321,8 +321,6 @@ static void sci_remote_node_context_ready_state_enter(struct sci_base_state_mach
321{ 321{
322 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); 322 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm);
323 enum sci_remote_node_context_destination_state dest_select; 323 enum sci_remote_node_context_destination_state dest_select;
324 scics_sds_remote_node_context_callback usr_cb = rnc->user_callback;
325 void *usr_param = rnc->user_cookie;
326 int tell_user = 1; 324 int tell_user = 1;
327 325
328 dest_select = rnc->destination_state; 326 dest_select = rnc->destination_state;
@@ -334,12 +332,10 @@ static void sci_remote_node_context_ready_state_enter(struct sci_base_state_mach
334 rnc, rnc->suspend_reason, 332 rnc, rnc->suspend_reason,
335 SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT); 333 SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT);
336 334
337 if (dest_select == RNC_DEST_SUSPENDED_RESUME) { 335 if (dest_select == RNC_DEST_SUSPENDED_RESUME)
338 sci_remote_node_context_resume(rnc, usr_cb, usr_param);
339 tell_user = 0; /* Wait until ready again. */ 336 tell_user = 0; /* Wait until ready again. */
340 }
341 } 337 }
342 if (tell_user && rnc->user_callback) 338 if (tell_user)
343 sci_remote_node_context_notify_user(rnc); 339 sci_remote_node_context_notify_user(rnc);
344} 340}
345 341
@@ -584,8 +580,6 @@ enum sci_status sci_remote_node_context_suspend(
584 dest_param = sci_rnc->destination_state; 580 dest_param = sci_rnc->destination_state;
585 581
586 switch (state) { 582 switch (state) {
587 case SCI_RNC_RESUMING:
588 break; /* The RNC has been posted, so start the suspend. */
589 case SCI_RNC_READY: 583 case SCI_RNC_READY:
590 break; 584 break;
591 case SCI_RNC_INVALIDATING: 585 case SCI_RNC_INVALIDATING:
@@ -596,6 +590,8 @@ enum sci_status sci_remote_node_context_suspend(
596 return SCI_FAILURE_INVALID_STATE; 590 return SCI_FAILURE_INVALID_STATE;
597 } 591 }
598 /* Fall through and handle like SCI_RNC_POSTING */ 592 /* Fall through and handle like SCI_RNC_POSTING */
593 case SCI_RNC_RESUMING:
594 /* Fall through and handle like SCI_RNC_POSTING */
599 case SCI_RNC_POSTING: 595 case SCI_RNC_POSTING:
600 /* Set the destination state to AWAIT - this signals the 596 /* Set the destination state to AWAIT - this signals the
601 * entry into the SCI_RNC_READY state that a suspension 597 * entry into the SCI_RNC_READY state that a suspension