diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-06-20 17:09:22 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:50 -0400 |
commit | fd53660120b5eda06539225de56755dc389a4e64 (patch) | |
tree | 97780e0cd62fd12ba2e171a0524ca5f335ba5906 /drivers | |
parent | 980d3aeb3828b0fdf2a0b2e893d238130b014575 (diff) |
isci: Explicitly decode remote node ready and suspended states
The remote node context should only signal a device reset condition
in a 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')
-rw-r--r-- | drivers/scsi/isci/remote_node_context.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c index 9e8967e19688..b6774bcdabd8 100644 --- a/drivers/scsi/isci/remote_node_context.c +++ b/drivers/scsi/isci/remote_node_context.c | |||
@@ -603,12 +603,23 @@ enum sci_status scic_sds_remote_node_context_start_io(struct scic_sds_remote_nod | |||
603 | enum scis_sds_remote_node_context_states state; | 603 | enum scis_sds_remote_node_context_states state; |
604 | 604 | ||
605 | state = sci_rnc->sm.current_state_id; | 605 | state = sci_rnc->sm.current_state_id; |
606 | if (state != SCI_RNC_READY) { | 606 | |
607 | switch (state) { | ||
608 | case SCI_RNC_READY: | ||
609 | return SCI_SUCCESS; | ||
610 | case SCI_RNC_TX_SUSPENDED: | ||
611 | case SCI_RNC_TX_RX_SUSPENDED: | ||
612 | case SCI_RNC_AWAIT_SUSPENSION: | ||
607 | dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), | 613 | dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), |
608 | "%s: invalid state %d\n", __func__, state); | 614 | "%s: invalid state %d\n", __func__, state); |
609 | return SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED; | 615 | return SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED; |
616 | default: | ||
617 | break; | ||
610 | } | 618 | } |
611 | return SCI_SUCCESS; | 619 | dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)), |
620 | "%s: requested to start IO while still resuming, %d\n", | ||
621 | __func__, state); | ||
622 | return SCI_FAILURE_INVALID_STATE; | ||
612 | } | 623 | } |
613 | 624 | ||
614 | enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc, | 625 | enum sci_status scic_sds_remote_node_context_start_task(struct scic_sds_remote_node_context *sci_rnc, |