Lines Matching refs:rnc
119 union scu_remote_node_context *rnc; in sci_remote_node_context_construct_buffer() local
124 rnc = sci_rnc_by_id(ihost, rni); in sci_remote_node_context_construct_buffer()
126 memset(rnc, 0, sizeof(union scu_remote_node_context) in sci_remote_node_context_construct_buffer()
129 rnc->ssp.remote_node_index = rni; in sci_remote_node_context_construct_buffer()
130 rnc->ssp.remote_node_port_width = idev->device_port_width; in sci_remote_node_context_construct_buffer()
131 rnc->ssp.logical_port_index = idev->owning_port->physical_port_index; in sci_remote_node_context_construct_buffer()
135 rnc->ssp.remote_sas_address_hi = upper_32_bits(sas_addr); in sci_remote_node_context_construct_buffer()
136 rnc->ssp.remote_sas_address_lo = lower_32_bits(sas_addr); in sci_remote_node_context_construct_buffer()
138 rnc->ssp.nexus_loss_timer_enable = true; in sci_remote_node_context_construct_buffer()
139 rnc->ssp.check_bit = false; in sci_remote_node_context_construct_buffer()
140 rnc->ssp.is_valid = false; in sci_remote_node_context_construct_buffer()
141 rnc->ssp.is_remote_node_context = true; in sci_remote_node_context_construct_buffer()
142 rnc->ssp.function_number = 0; in sci_remote_node_context_construct_buffer()
144 rnc->ssp.arbitration_wait_time = 0; in sci_remote_node_context_construct_buffer()
147 rnc->ssp.connection_occupancy_timeout = in sci_remote_node_context_construct_buffer()
149 rnc->ssp.connection_inactivity_timeout = in sci_remote_node_context_construct_buffer()
152 rnc->ssp.connection_occupancy_timeout = in sci_remote_node_context_construct_buffer()
154 rnc->ssp.connection_inactivity_timeout = in sci_remote_node_context_construct_buffer()
158 rnc->ssp.initial_arbitration_wait_time = 0; in sci_remote_node_context_construct_buffer()
161 rnc->ssp.oaf_connection_rate = idev->connection_rate; in sci_remote_node_context_construct_buffer()
162 rnc->ssp.oaf_features = 0; in sci_remote_node_context_construct_buffer()
163 rnc->ssp.oaf_source_zone_group = 0; in sci_remote_node_context_construct_buffer()
164 rnc->ssp.oaf_more_compatibility_features = 0; in sci_remote_node_context_construct_buffer()
205 struct sci_remote_node_context *rnc) in sci_remote_node_context_notify_user() argument
207 if (rnc->user_callback != NULL) { in sci_remote_node_context_notify_user()
208 (*rnc->user_callback)(rnc->user_cookie); in sci_remote_node_context_notify_user()
210 rnc->user_callback = NULL; in sci_remote_node_context_notify_user()
211 rnc->user_cookie = NULL; in sci_remote_node_context_notify_user()
215 static void sci_remote_node_context_continue_state_transitions(struct sci_remote_node_context *rnc) in sci_remote_node_context_continue_state_transitions() argument
217 switch (rnc->destination_state) { in sci_remote_node_context_continue_state_transitions()
220 rnc->destination_state = RNC_DEST_READY; in sci_remote_node_context_continue_state_transitions()
223 sci_remote_node_context_resume(rnc, rnc->user_callback, in sci_remote_node_context_continue_state_transitions()
224 rnc->user_cookie); in sci_remote_node_context_continue_state_transitions()
227 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_continue_state_transitions()
270 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_initial_state_enter() local
271 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_initial_state_enter()
278 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_initial_state_enter()
279 sci_remote_node_context_notify_user(rnc); in sci_remote_node_context_initial_state_enter()
295 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_invalidating_state_enter() local
298 sci_remote_device_terminate_requests(rnc_to_dev(rnc)); in sci_remote_node_context_invalidating_state_enter()
299 sci_remote_node_context_invalidate_context_buffer(rnc); in sci_remote_node_context_invalidating_state_enter()
304 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_resuming_state_enter() local
308 idev = rnc_to_dev(rnc); in sci_remote_node_context_resuming_state_enter()
318 sci_port_setup_transports(idev->owning_port, rnc->remote_node_index); in sci_remote_node_context_resuming_state_enter()
325 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_ready_state_enter() local
329 dest_select = rnc->destination_state; in sci_remote_node_context_ready_state_enter()
330 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_ready_state_enter()
335 rnc, rnc->suspend_reason, in sci_remote_node_context_ready_state_enter()
342 sci_remote_node_context_notify_user(rnc); in sci_remote_node_context_ready_state_enter()
347 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_tx_suspended_state_enter() local
349 sci_remote_node_context_continue_state_transitions(rnc); in sci_remote_node_context_tx_suspended_state_enter()
354 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_tx_rx_suspended_state_enter() local
355 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_tx_rx_suspended_state_enter()
357 u32 new_count = rnc->suspend_count + 1; in sci_remote_node_context_tx_rx_suspended_state_enter()
360 rnc->suspend_count = 1; in sci_remote_node_context_tx_rx_suspended_state_enter()
362 rnc->suspend_count = new_count; in sci_remote_node_context_tx_rx_suspended_state_enter()
369 sci_remote_node_context_continue_state_transitions(rnc); in sci_remote_node_context_tx_rx_suspended_state_enter()
375 struct sci_remote_node_context *rnc in sci_remote_node_context_await_suspend_state_exit() local
376 = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_await_suspend_state_exit()
377 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_await_suspend_state_exit()
410 void sci_remote_node_context_construct(struct sci_remote_node_context *rnc, in sci_remote_node_context_construct() argument
413 memset(rnc, 0, sizeof(struct sci_remote_node_context)); in sci_remote_node_context_construct()
415 rnc->remote_node_index = remote_node_index; in sci_remote_node_context_construct()
416 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_construct()
418 sci_init_sm(&rnc->sm, sci_remote_node_context_state_table, SCI_RNC_INITIAL); in sci_remote_node_context_construct()