diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2012-03-09 10:42:08 +0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2012-05-18 01:33:43 +0400 |
commit | 1f05388933cb6e57ed9e51768c194ff145002f3b (patch) | |
tree | 4e4bae448746ffdb0196b8e16a4f25893eb10855 /drivers/scsi/isci/remote_node_context.h | |
parent | c5457a82a404db3c447df22e6425c5c140c4bee1 (diff) | |
download | linux-1f05388933cb6e57ed9e51768c194ff145002f3b.tar.xz |
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.h | 7 |
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_ */ |