summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_node_context.h
diff options
context:
space:
mode:
authorJeff Skirvin2012-03-09 07:42:08 +0100
committerDan Williams2012-05-17 23:33:43 +0200
commit1f05388933cb6e57ed9e51768c194ff145002f3b (patch)
tree4e4bae448746ffdb0196b8e16a4f25893eb10855 /drivers/scsi/isci/remote_node_context.h
parentisci: Change the phy control and link reset interface for HW reasons. (diff)
downloadkernel-qcow2-linux-1f05388933cb6e57ed9e51768c194ff145002f3b.tar.gz
kernel-qcow2-linux-1f05388933cb6e57ed9e51768c194ff145002f3b.tar.xz
kernel-qcow2-linux-1f05388933cb6e57ed9e51768c194ff145002f3b.zip
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 c61c02e095ad..0d4a24d647b4 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_ */