aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_node_context.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-02-10 04:18:44 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-29 17:23:15 -0500
commitd7a0ccdd9bd78b5b74d2963ec7ab67c9d896902a (patch)
tree9fc59d3303e7453006c767b0f4daadbf3d4ed5c1 /drivers/scsi/isci/remote_node_context.h
parent16d3db1b298529e6aec4a4cf0f56225d9e0bc641 (diff)
[SCSI] isci: debug, provide state-enum-to-string conversions
Debugging the driver requires tracing the state transtions and tracing state names is less work than decoding numbers. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/remote_node_context.h')
-rw-r--r--drivers/scsi/isci/remote_node_context.h97
1 files changed, 43 insertions, 54 deletions
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h
index 41580ad1252..a241e0f4c86 100644
--- a/drivers/scsi/isci/remote_node_context.h
+++ b/drivers/scsi/isci/remote_node_context.h
@@ -85,61 +85,50 @@ struct sci_remote_node_context;
85typedef void (*scics_sds_remote_node_context_callback)(void *); 85typedef void (*scics_sds_remote_node_context_callback)(void *);
86 86
87/** 87/**
88 * This is the enumeration of the remote node context states. 88 * enum sci_remote_node_context_states
89 * @SCI_RNC_INITIAL initial state for a remote node context. On a resume
90 * request the remote node context will transition to the posting state.
91 *
92 * @SCI_RNC_POSTING: transition state that posts the RNi to the hardware. Once
93 * the RNC is posted the remote node context will be made ready.
94 *
95 * @SCI_RNC_INVALIDATING: transition state that will post an RNC invalidate to
96 * the hardware. Once the invalidate is complete the remote node context will
97 * transition to the posting state.
98 *
99 * @SCI_RNC_RESUMING: transition state that will post an RNC resume to the
100 * hardare. Once the event notification of resume complete is received the
101 * remote node context will transition to the ready state.
102 *
103 * @SCI_RNC_READY: state that the remote node context must be in to accept io
104 * request operations.
105 *
106 * @SCI_RNC_TX_SUSPENDED: state that the remote node context transitions to when
107 * it gets a TX suspend notification from the hardware.
108 *
109 * @SCI_RNC_TX_RX_SUSPENDED: state that the remote node context transitions to
110 * when it gets a TX RX suspend notification from the hardware.
111 *
112 * @SCI_RNC_AWAIT_SUSPENSION: wait state for the remote node context that waits
113 * for a suspend notification from the hardware. This state is entered when
114 * either there is a request to supend the remote node context or when there is
115 * a TC completion where the remote node will be suspended by the hardware.
89 */ 116 */
90enum scis_sds_remote_node_context_states { 117#define RNC_STATES {\
91 /** 118 C(RNC_INITIAL),\
92 * This state is the initial state for a remote node context. On a resume 119 C(RNC_POSTING),\
93 * request the remote node context will transition to the posting state. 120 C(RNC_INVALIDATING),\
94 */ 121 C(RNC_RESUMING),\
95 SCI_RNC_INITIAL, 122 C(RNC_READY),\
96 123 C(RNC_TX_SUSPENDED),\
97 /** 124 C(RNC_TX_RX_SUSPENDED),\
98 * This is a transition state that posts the RNi to the hardware. Once the RNC 125 C(RNC_AWAIT_SUSPENSION),\
99 * is posted the remote node context will be made ready. 126 }
100 */ 127#undef C
101 SCI_RNC_POSTING, 128#define C(a) SCI_##a
102 129enum scis_sds_remote_node_context_states RNC_STATES;
103 /** 130#undef C
104 * This is a transition state that will post an RNC invalidate to the 131const char *rnc_state_name(enum scis_sds_remote_node_context_states state);
105 * hardware. Once the invalidate is complete the remote node context will
106 * transition to the posting state.
107 */
108 SCI_RNC_INVALIDATING,
109
110 /**
111 * This is a transition state that will post an RNC resume to the hardare.
112 * Once the event notification of resume complete is received the remote node
113 * context will transition to the ready state.
114 */
115 SCI_RNC_RESUMING,
116
117 /**
118 * This is the state that the remote node context must be in to accept io
119 * request operations.
120 */
121 SCI_RNC_READY,
122
123 /**
124 * This is the state that the remote node context transitions to when it gets
125 * a TX suspend notification from the hardware.
126 */
127 SCI_RNC_TX_SUSPENDED,
128
129 /**
130 * This is the state that the remote node context transitions to when it gets
131 * a TX RX suspend notification from the hardware.
132 */
133 SCI_RNC_TX_RX_SUSPENDED,
134
135 /**
136 * This state is a wait state for the remote node context that waits for a
137 * suspend notification from the hardware. This state is entered when either
138 * there is a request to supend the remote node context or when there is a TC
139 * completion where the remote node will be suspended by the hardware.
140 */
141 SCI_RNC_AWAIT_SUSPENSION
142};
143 132
144/** 133/**
145 * 134 *