isci: End the RNC resumption wait when the RNC is destroyed.
While the RNC is suspended for I/O cleanup, the remote device can be
stopped and the RNC setup for destruction. These changes accomodate that
case in the abort path.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h
index 0d4a24d..a703b9c 100644
--- a/drivers/scsi/isci/remote_node_context.h
+++ b/drivers/scsi/isci/remote_node_context.h
@@ -229,8 +229,8 @@
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);
+ return (sci_rnc->destination_state == RNC_DEST_FINAL)
+ || ((sci_rnc->sm.current_state_id == SCI_RNC_INITIAL)
+ && (sci_rnc->destination_state == RNC_DEST_UNSPECIFIED));
}
#endif /* _SCIC_SDS_REMOTE_NODE_CONTEXT_H_ */