diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2012-03-09 01:41:49 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2012-05-17 17:33:36 -0400 |
commit | 56d7c013e714c6feab2ab5ac854808e29048b069 (patch) | |
tree | da627f1e8d49fe6d2350123b31f418e572f15ad0 /drivers/scsi/isci | |
parent | 6f48844e3f16b7d8a1f9a1a11bd9a11089a5292f (diff) |
isci: Fixed bug in resumption from RNC Tx/Rx suspend state.
The resumption from the Tx/Rx suspended state should work the same
as the Tx suspended 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.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 3a55ba66b8ac..3e849752bffa 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c | |||
@@ -557,10 +557,16 @@ enum sci_status sci_remote_node_context_resume(struct sci_remote_node_context *s | |||
557 | sci_rnc->user_callback = cb_fn; | 557 | sci_rnc->user_callback = cb_fn; |
558 | sci_rnc->user_cookie = cb_p; | 558 | sci_rnc->user_cookie = cb_p; |
559 | return SCI_SUCCESS; | 559 | return SCI_SUCCESS; |
560 | case SCI_RNC_TX_SUSPENDED: { | 560 | case SCI_RNC_TX_SUSPENDED: |
561 | case SCI_RNC_TX_RX_SUSPENDED: { | ||
561 | struct isci_remote_device *idev = rnc_to_dev(sci_rnc); | 562 | struct isci_remote_device *idev = rnc_to_dev(sci_rnc); |
562 | struct domain_device *dev = idev->domain_dev; | 563 | struct domain_device *dev = idev->domain_dev; |
563 | 564 | ||
565 | /* If this is an expander attached SATA device we must | ||
566 | * invalidate and repost the RNC since this is the only way | ||
567 | * to clear the TCi to NCQ tag mapping table for the RNi. | ||
568 | * All other device types we can just resume. | ||
569 | */ | ||
564 | sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); | 570 | sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); |
565 | 571 | ||
566 | if (dev_is_sata(dev) && dev->parent) | 572 | if (dev_is_sata(dev) && dev->parent) |
@@ -569,10 +575,6 @@ enum sci_status sci_remote_node_context_resume(struct sci_remote_node_context *s | |||
569 | sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); | 575 | sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); |
570 | return SCI_SUCCESS; | 576 | return SCI_SUCCESS; |
571 | } | 577 | } |
572 | case SCI_RNC_TX_RX_SUSPENDED: | ||
573 | sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); | ||
574 | sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); | ||
575 | return SCI_FAILURE_INVALID_STATE; | ||
576 | case SCI_RNC_AWAIT_SUSPENSION: | 578 | case SCI_RNC_AWAIT_SUSPENSION: |
577 | sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); | 579 | sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); |
578 | return SCI_SUCCESS; | 580 | return SCI_SUCCESS; |