Lines Matching refs:state

51 static int hermon_agent_list_init(hermon_state_t *state);
52 static void hermon_agent_list_fini(hermon_state_t *state);
53 static int hermon_agent_register_all(hermon_state_t *state);
54 static int hermon_agent_unregister_all(hermon_state_t *state, int num_reg);
55 static void hermon_agent_mad_resp_handling(hermon_state_t *state,
63 hermon_agent_handlers_init(hermon_state_t *state) in hermon_agent_handlers_init() argument
69 if ((state->hs_cfg_profile->cp_qp0_agents_in_fw) && in hermon_agent_handlers_init()
70 (state->hs_cfg_profile->cp_qp1_agents_in_fw)) { in hermon_agent_handlers_init()
82 status = hermon_agent_list_init(state); in hermon_agent_handlers_init()
93 state->hs_taskq_agents = ddi_taskq_create(state->hs_dip, in hermon_agent_handlers_init()
95 if (state->hs_taskq_agents == NULL) { in hermon_agent_handlers_init()
96 hermon_agent_list_fini(state); in hermon_agent_handlers_init()
101 status = hermon_agent_register_all(state); in hermon_agent_handlers_init()
103 ddi_taskq_destroy(state->hs_taskq_agents); in hermon_agent_handlers_init()
104 hermon_agent_list_fini(state); in hermon_agent_handlers_init()
122 hermon_agent_handlers_fini(hermon_state_t *state) in hermon_agent_handlers_fini() argument
127 if ((state->hs_cfg_profile->cp_qp0_agents_in_fw) && in hermon_agent_handlers_fini()
128 (state->hs_cfg_profile->cp_qp1_agents_in_fw)) { in hermon_agent_handlers_fini()
133 status = hermon_agent_unregister_all(state, state->hs_num_agents); in hermon_agent_handlers_fini()
146 ddi_taskq_destroy(state->hs_taskq_agents); in hermon_agent_handlers_fini()
149 hermon_agent_list_fini(state); in hermon_agent_handlers_fini()
165 hermon_state_t *state; in hermon_agent_request_cb() local
169 state = curr->agl_state; in hermon_agent_request_cb()
195 status = ddi_taskq_dispatch(state->hs_taskq_agents, in hermon_agent_request_cb()
209 hermon_get_smlid(hermon_state_t *state, uint_t port) in hermon_get_smlid() argument
214 status = hermon_getportinfo_cmd_post(state, port, in hermon_get_smlid()
259 hermon_set_port_capability(hermon_state_t *state, uint8_t port, in hermon_set_port_capability() argument
269 if (!hermon_portnum_is_valid(state, port)) { in hermon_set_port_capability()
294 status = hermon_set_port_cmd_post(state, &set_port, port, in hermon_set_port_capability()
297 HERMON_WARNING(state, "failed to modify port capabilities"); in hermon_set_port_capability()
319 hermon_state_t *state; in hermon_agent_handle_req() local
337 state = curr->agl_state; in hermon_agent_handle_req()
366 hermon_get_smlid(state, port); in hermon_agent_handle_req()
395 status = hermon_getportinfo_cmd_post(state, port, in hermon_agent_handle_req()
415 status = hermon_mad_ifc_cmd_post(state, port, in hermon_agent_handle_req()
462 if (hermon_set_port_capability(state, in hermon_agent_handle_req()
515 ibc_async_handler(state->hs_ibtfpriv, code, in hermon_agent_handle_req()
536 hermon_agent_mad_resp_handling(state, msgp, port); in hermon_agent_handle_req()
544 msgp, &retrans, hermon_agent_response_cb, state, 0); in hermon_agent_handle_req()
585 hermon_agent_list_init(hermon_state_t *state) in hermon_agent_list_init() argument
601 num_ports = state->hs_cfg_profile->cp_num_ports; in hermon_agent_list_init()
604 do_qp0 = state->hs_cfg_profile->cp_qp0_agents_in_fw; in hermon_agent_list_init()
605 do_qp1 = state->hs_cfg_profile->cp_qp1_agents_in_fw; in hermon_agent_list_init()
626 state->hs_num_agents = num_agents; in hermon_agent_list_init()
631 state->hs_agents = (hermon_agent_list_t *)kmem_zalloc(num_agents * in hermon_agent_list_init()
633 if (state->hs_agents == NULL) { in hermon_agent_list_init()
644 curr = &state->hs_agents[indx]; in hermon_agent_list_init()
645 curr->agl_state = state; in hermon_agent_list_init()
673 hermon_agent_list_fini(hermon_state_t *state) in hermon_agent_list_fini() argument
676 kmem_free(state->hs_agents, in hermon_agent_list_fini()
677 state->hs_num_agents * sizeof (hermon_agent_list_t)); in hermon_agent_list_fini()
686 hermon_agent_register_all(hermon_state_t *state) in hermon_agent_register_all() argument
695 nodeguid = state->hs_ibtfinfo.hca_attr->hca_node_guid; in hermon_agent_register_all()
706 if (state->hs_num_agents == 0) { in hermon_agent_register_all()
710 for (i = 0; i < state->hs_num_agents; i++) { in hermon_agent_register_all()
712 curr = &state->hs_agents[i]; in hermon_agent_register_all()
736 (void) hermon_agent_unregister_all(state, num_registered); in hermon_agent_register_all()
746 hermon_agent_unregister_all(hermon_state_t *state, int num_reg) in hermon_agent_unregister_all() argument
760 curr = &state->hs_agents[i]; in hermon_agent_unregister_all()
786 hermon_agent_mad_resp_handling(hermon_state_t *state, ibmf_msg_t *msgp, in hermon_agent_mad_resp_handling() argument