diff options
author | Edmund Nadolski <edmund.nadolski@intel.com> | 2011-06-01 20:10:43 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:50 -0400 |
commit | e301370ac553a9a0ac0d1d25e769b86cf60395b3 (patch) | |
tree | 58c00e0aeb21c3101df389d4b5e34f47e4b32119 /drivers/scsi/isci/remote_node_context.h | |
parent | 8d2c65c09c9e0adc16070562e7944c1c3277f332 (diff) |
isci: state machine cleanup
This cleans up several areas of the state machine mechanism:
o Rename sci_base_state_machine_change_state to sci_change_state
o Remove sci_base_state_machine_get_state function
o Rename 'state_machine' struct member to 'sm' in client structs
o Shorten the name of request states
o Shorten state machine state names as follows:
SCI_BASE_CONTROLLER_STATE_xxx to SCIC_xxx
SCI_BASE_PHY_STATE_xxx to SCI_PHY_xxx
SCIC_SDS_PHY_STARTING_SUBSTATE_xxx to SCI_PHY_SUB_xxx
SCI_BASE_PORT_STATE_xxx to SCI_PORT_xxx and
SCIC_SDS_PORT_READY_SUBSTATE_xxx to SCI_PORT_SUB_xxx
SCI_BASE_REMOTE_DEVICE_STATE_xxx to SCI_DEV_xxx
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_STP_DEV_xxx
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_SMP_DEV_xxx
SCIC_SDS_REMOTE_NODE_CONTEXT_xxx_STATE to SCI_RNC_xxx
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@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 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/isci/remote_node_context.h b/drivers/scsi/isci/remote_node_context.h index f53329f782c8..e6c7248be3f6 100644 --- a/drivers/scsi/isci/remote_node_context.h +++ b/drivers/scsi/isci/remote_node_context.h | |||
@@ -92,45 +92,45 @@ enum scis_sds_remote_node_context_states { | |||
92 | * This state is the initial state for a remote node context. On a resume | 92 | * This state is the initial state for a remote node context. On a resume |
93 | * request the remote node context will transition to the posting state. | 93 | * request the remote node context will transition to the posting state. |
94 | */ | 94 | */ |
95 | SCIC_SDS_REMOTE_NODE_CONTEXT_INITIAL_STATE, | 95 | SCI_RNC_INITIAL, |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * This is a transition state that posts the RNi to the hardware. Once the RNC | 98 | * This is a transition state that posts the RNi to the hardware. Once the RNC |
99 | * is posted the remote node context will be made ready. | 99 | * is posted the remote node context will be made ready. |
100 | */ | 100 | */ |
101 | SCIC_SDS_REMOTE_NODE_CONTEXT_POSTING_STATE, | 101 | SCI_RNC_POSTING, |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * This is a transition state that will post an RNC invalidate to the | 104 | * This is a transition state that will post an RNC invalidate to the |
105 | * hardware. Once the invalidate is complete the remote node context will | 105 | * hardware. Once the invalidate is complete the remote node context will |
106 | * transition to the posting state. | 106 | * transition to the posting state. |
107 | */ | 107 | */ |
108 | SCIC_SDS_REMOTE_NODE_CONTEXT_INVALIDATING_STATE, | 108 | SCI_RNC_INVALIDATING, |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * This is a transition state that will post an RNC resume to the hardare. | 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 | 112 | * Once the event notification of resume complete is received the remote node |
113 | * context will transition to the ready state. | 113 | * context will transition to the ready state. |
114 | */ | 114 | */ |
115 | SCIC_SDS_REMOTE_NODE_CONTEXT_RESUMING_STATE, | 115 | SCI_RNC_RESUMING, |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * This is the state that the remote node context must be in to accept io | 118 | * This is the state that the remote node context must be in to accept io |
119 | * request operations. | 119 | * request operations. |
120 | */ | 120 | */ |
121 | SCIC_SDS_REMOTE_NODE_CONTEXT_READY_STATE, | 121 | SCI_RNC_READY, |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * This is the state that the remote node context transitions to when it gets | 124 | * This is the state that the remote node context transitions to when it gets |
125 | * a TX suspend notification from the hardware. | 125 | * a TX suspend notification from the hardware. |
126 | */ | 126 | */ |
127 | SCIC_SDS_REMOTE_NODE_CONTEXT_TX_SUSPENDED_STATE, | 127 | SCI_RNC_TX_SUSPENDED, |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * This is the state that the remote node context transitions to when it gets | 130 | * This is the state that the remote node context transitions to when it gets |
131 | * a TX RX suspend notification from the hardware. | 131 | * a TX RX suspend notification from the hardware. |
132 | */ | 132 | */ |
133 | SCIC_SDS_REMOTE_NODE_CONTEXT_TX_RX_SUSPENDED_STATE, | 133 | SCI_RNC_TX_RX_SUSPENDED, |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * This state is a wait state for the remote node context that waits for a | 136 | * This state is a wait state for the remote node context that waits for a |
@@ -138,7 +138,7 @@ enum scis_sds_remote_node_context_states { | |||
138 | * there is a request to supend the remote node context or when there is a TC | 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. | 139 | * completion where the remote node will be suspended by the hardware. |
140 | */ | 140 | */ |
141 | SCIC_SDS_REMOTE_NODE_CONTEXT_AWAIT_SUSPENSION_STATE | 141 | SCI_RNC_AWAIT_SUSPENSION |
142 | }; | 142 | }; |
143 | 143 | ||
144 | /** | 144 | /** |
@@ -194,7 +194,7 @@ struct scic_sds_remote_node_context { | |||
194 | /** | 194 | /** |
195 | * This field contains the data for the object's state machine. | 195 | * This field contains the data for the object's state machine. |
196 | */ | 196 | */ |
197 | struct sci_base_state_machine state_machine; | 197 | struct sci_base_state_machine sm; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc, | 200 | void scic_sds_remote_node_context_construct(struct scic_sds_remote_node_context *rnc, |