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()
212 struct sci_remote_node_context *rnc) in sci_remote_node_context_notify_user() argument
214 if (rnc->user_callback != NULL) { in sci_remote_node_context_notify_user()
215 (*rnc->user_callback)(rnc->user_cookie); in sci_remote_node_context_notify_user()
217 rnc->user_callback = NULL; in sci_remote_node_context_notify_user()
218 rnc->user_cookie = NULL; in sci_remote_node_context_notify_user()
222 static void sci_remote_node_context_continue_state_transitions(struct sci_remote_node_context *rnc) in sci_remote_node_context_continue_state_transitions() argument
224 switch (rnc->destination_state) { in sci_remote_node_context_continue_state_transitions()
227 rnc->destination_state = RNC_DEST_READY; in sci_remote_node_context_continue_state_transitions()
230 sci_remote_node_context_resume(rnc, rnc->user_callback, in sci_remote_node_context_continue_state_transitions()
231 rnc->user_cookie); in sci_remote_node_context_continue_state_transitions()
234 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_continue_state_transitions()
277 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_initial_state_enter() local
278 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_initial_state_enter()
285 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_initial_state_enter()
286 sci_remote_node_context_notify_user(rnc); in sci_remote_node_context_initial_state_enter()
302 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_invalidating_state_enter() local
305 sci_remote_device_terminate_requests(rnc_to_dev(rnc)); in sci_remote_node_context_invalidating_state_enter()
306 sci_remote_node_context_invalidate_context_buffer(rnc); in sci_remote_node_context_invalidating_state_enter()
311 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_resuming_state_enter() local
315 idev = rnc_to_dev(rnc); in sci_remote_node_context_resuming_state_enter()
325 sci_port_setup_transports(idev->owning_port, rnc->remote_node_index); in sci_remote_node_context_resuming_state_enter()
332 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_ready_state_enter() local
336 dest_select = rnc->destination_state; in sci_remote_node_context_ready_state_enter()
337 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_ready_state_enter()
342 rnc, rnc->suspend_reason, in sci_remote_node_context_ready_state_enter()
349 sci_remote_node_context_notify_user(rnc); in sci_remote_node_context_ready_state_enter()
354 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_tx_suspended_state_enter() local
356 sci_remote_node_context_continue_state_transitions(rnc); in sci_remote_node_context_tx_suspended_state_enter()
361 struct sci_remote_node_context *rnc = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_tx_rx_suspended_state_enter() local
362 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_tx_rx_suspended_state_enter()
364 u32 new_count = rnc->suspend_count + 1; in sci_remote_node_context_tx_rx_suspended_state_enter()
367 rnc->suspend_count = 1; in sci_remote_node_context_tx_rx_suspended_state_enter()
369 rnc->suspend_count = new_count; in sci_remote_node_context_tx_rx_suspended_state_enter()
376 sci_remote_node_context_continue_state_transitions(rnc); in sci_remote_node_context_tx_rx_suspended_state_enter()
382 struct sci_remote_node_context *rnc in sci_remote_node_context_await_suspend_state_exit() local
383 = container_of(sm, typeof(*rnc), sm); in sci_remote_node_context_await_suspend_state_exit()
384 struct isci_remote_device *idev = rnc_to_dev(rnc); in sci_remote_node_context_await_suspend_state_exit()
417 void sci_remote_node_context_construct(struct sci_remote_node_context *rnc, in sci_remote_node_context_construct() argument
420 memset(rnc, 0, sizeof(struct sci_remote_node_context)); in sci_remote_node_context_construct()
422 rnc->remote_node_index = remote_node_index; in sci_remote_node_context_construct()
423 rnc->destination_state = RNC_DEST_UNSPECIFIED; in sci_remote_node_context_construct()
425 sci_init_sm(&rnc->sm, sci_remote_node_context_state_table, SCI_RNC_INITIAL); in sci_remote_node_context_construct()