aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/remote_node_context.h
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-08 22:42:08 -0800
committerDan Williams <dan.j.williams@intel.com>2012-05-17 14:33:43 -0700
commit1f05388933cb6e57ed9e51768c194ff145002f3b (patch)
tree4e4bae448746ffdb0196b8e16a4f25893eb10855 /drivers/scsi/isci/remote_node_context.h
parentc5457a82a404db3c447df22e6425c5c140c4bee1 (diff)
isci: Don't wait for an RNC suspend if it's being destroyed.
Make sure that the wait for suspend can handle the RNC destruction case. 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/remote_node_context.h')
-rw-r--r--drivers/scsi/isci/remote_node_context.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h
index c61c02e095a..0d4a24d647b 100644
--- a/drivers/scsi/isci/remote_node_context.h
+++ b/drivers/scsi/isci/remote_node_context.h
@@ -226,4 +226,11 @@ enum sci_status sci_remote_node_context_start_io(struct sci_remote_node_context
int sci_remote_node_context_is_safe_to_abort(
struct sci_remote_node_context *sci_rnc);
+static inline bool sci_remote_node_context_is_being_destroyed(
+ struct sci_remote_node_context *sci_rnc)
+{
+ return ((sci_rnc->sm.current_state_id == SCI_RNC_INVALIDATING)
+ && (sci_rnc->destination_state == RNC_DEST_FINAL))
+ || (sci_rnc->sm.current_state_id == SCI_RNC_INITIAL);
+}
#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */