Lines Matching refs:sci_rnc

82 	struct sci_remote_node_context *sci_rnc)  in sci_remote_node_context_is_ready()  argument
84 u32 current_state = sci_rnc->sm.current_state_id; in sci_remote_node_context_is_ready()
102 static void sci_remote_node_context_construct_buffer(struct sci_remote_node_context *sci_rnc) in sci_remote_node_context_construct_buffer() argument
104 struct isci_remote_device *idev = rnc_to_dev(sci_rnc); in sci_remote_node_context_construct_buffer()
106 int rni = sci_rnc->remote_node_index; in sci_remote_node_context_construct_buffer()
166 struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_setup_to_resume() argument
170 if (sci_rnc->destination_state != SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_FINAL) { in sci_remote_node_context_setup_to_resume()
171 sci_rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_READY; in sci_remote_node_context_setup_to_resume()
172 sci_rnc->user_callback = callback; in sci_remote_node_context_setup_to_resume()
173 sci_rnc->user_cookie = callback_parameter; in sci_remote_node_context_setup_to_resume()
178 struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_setup_to_destory() argument
182 sci_rnc->destination_state = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_FINAL; in sci_remote_node_context_setup_to_destory()
183 sci_rnc->user_callback = callback; in sci_remote_node_context_setup_to_destory()
184 sci_rnc->user_cookie = callback_parameter; in sci_remote_node_context_setup_to_destory()
211 static void sci_remote_node_context_validate_context_buffer(struct sci_remote_node_context *sci_rnc) in sci_remote_node_context_validate_context_buffer() argument
214 struct isci_remote_device *idev = rnc_to_dev(sci_rnc); in sci_remote_node_context_validate_context_buffer()
218 rnc_buffer = sci_rnc_by_id(ihost, sci_rnc->remote_node_index); in sci_remote_node_context_validate_context_buffer()
230 sci_rnc->remote_node_index); in sci_remote_node_context_validate_context_buffer()
234 …tic void sci_remote_node_context_invalidate_context_buffer(struct sci_remote_node_context *sci_rnc) in sci_remote_node_context_invalidate_context_buffer() argument
237 struct isci_remote_device *idev = rnc_to_dev(sci_rnc); in sci_remote_node_context_invalidate_context_buffer()
240 rnc_buffer = sci_rnc_by_id(ihost, sci_rnc->remote_node_index); in sci_remote_node_context_invalidate_context_buffer()
244 sci_remote_device_post_request(rnc_to_dev(sci_rnc), in sci_remote_node_context_invalidate_context_buffer()
263 struct sci_remote_node_context *sci_rnc = container_of(sm, typeof(*sci_rnc), sm); in sci_remote_node_context_posting_state_enter() local
265 sci_remote_node_context_validate_context_buffer(sci_rnc); in sci_remote_node_context_posting_state_enter()
358 enum sci_status sci_remote_node_context_event_handler(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_event_handler() argument
363 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_event_handler()
368 sci_change_state(&sci_rnc->sm, SCI_RNC_READY); in sci_remote_node_context_event_handler()
376 if (sci_rnc->destination_state == SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_FINAL) in sci_remote_node_context_event_handler()
380 sci_change_state(&sci_rnc->sm, state); in sci_remote_node_context_event_handler()
387 dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_event_handler()
390 "invalidated.\n", __func__, sci_rnc); in sci_remote_node_context_event_handler()
399 sci_change_state(&sci_rnc->sm, SCI_RNC_READY); in sci_remote_node_context_event_handler()
406 dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_event_handler()
409 __func__, sci_rnc); in sci_remote_node_context_event_handler()
419 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_SUSPENDED); in sci_remote_node_context_event_handler()
420 sci_rnc->suspension_code = scu_get_event_specifier(event_code); in sci_remote_node_context_event_handler()
423 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_RX_SUSPENDED); in sci_remote_node_context_event_handler()
424 sci_rnc->suspension_code = scu_get_event_specifier(event_code); in sci_remote_node_context_event_handler()
433 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_SUSPENDED); in sci_remote_node_context_event_handler()
434 sci_rnc->suspension_code = scu_get_event_specifier(event_code); in sci_remote_node_context_event_handler()
437 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_RX_SUSPENDED); in sci_remote_node_context_event_handler()
438 sci_rnc->suspension_code = scu_get_event_specifier(event_code); in sci_remote_node_context_event_handler()
445 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_event_handler()
452 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_event_handler()
458 enum sci_status sci_remote_node_context_destruct(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_destruct() argument
464 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_destruct()
467 sci_remote_node_context_setup_to_destory(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_destruct()
475 sci_remote_node_context_setup_to_destory(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_destruct()
476 sci_change_state(&sci_rnc->sm, SCI_RNC_INVALIDATING); in sci_remote_node_context_destruct()
479 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_destruct()
487 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_destruct()
493 enum sci_status sci_remote_node_context_suspend(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_suspend() argument
500 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_suspend()
502 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_suspend()
507 sci_rnc->user_callback = cb_fn; in sci_remote_node_context_suspend()
508 sci_rnc->user_cookie = cb_p; in sci_remote_node_context_suspend()
509 sci_rnc->suspension_code = suspend_type; in sci_remote_node_context_suspend()
512 sci_remote_device_post_request(rnc_to_dev(sci_rnc), in sci_remote_node_context_suspend()
516 sci_change_state(&sci_rnc->sm, SCI_RNC_AWAIT_SUSPENSION); in sci_remote_node_context_suspend()
520 enum sci_status sci_remote_node_context_resume(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_resume() argument
526 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_resume()
529 if (sci_rnc->remote_node_index == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX) in sci_remote_node_context_resume()
532 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_resume()
533 sci_remote_node_context_construct_buffer(sci_rnc); in sci_remote_node_context_resume()
534 sci_change_state(&sci_rnc->sm, SCI_RNC_POSTING); in sci_remote_node_context_resume()
539 if (sci_rnc->destination_state != SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_READY) in sci_remote_node_context_resume()
542 sci_rnc->user_callback = cb_fn; in sci_remote_node_context_resume()
543 sci_rnc->user_cookie = cb_p; in sci_remote_node_context_resume()
546 struct isci_remote_device *idev = rnc_to_dev(sci_rnc); in sci_remote_node_context_resume()
549 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_resume()
553 sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); in sci_remote_node_context_resume()
557 sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); in sci_remote_node_context_resume()
559 sci_change_state(&sci_rnc->sm, SCI_RNC_INVALIDATING); in sci_remote_node_context_resume()
566 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_resume()
567 sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); in sci_remote_node_context_resume()
570 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); in sci_remote_node_context_resume()
573 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_resume()
579 enum sci_status sci_remote_node_context_start_io(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_start_io() argument
584 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_start_io()
592 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_start_io()
598 dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_start_io()
604 enum sci_status sci_remote_node_context_start_task(struct sci_remote_node_context *sci_rnc, in sci_remote_node_context_start_task() argument
609 state = sci_rnc->sm.current_state_id; in sci_remote_node_context_start_task()
617 sci_remote_node_context_resume(sci_rnc, NULL, NULL); in sci_remote_node_context_start_task()
620 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), in sci_remote_node_context_start_task()