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