Lines Matching refs:agent

120 	struct ib_mad_agent    *agent[IB_UMAD_MAX_AGENTS];  member
175 return file->agents_dead ? NULL : file->agent[id]; in __get_agent()
179 struct ib_mad_agent *agent, in queue_packet() argument
189 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
209 static void send_handler(struct ib_mad_agent *agent, in send_handler() argument
212 struct ib_umad_file *file = agent->context; in send_handler()
222 if (!queue_packet(file, agent, packet)) in send_handler()
228 static void recv_handler(struct ib_mad_agent *agent, in recv_handler() argument
232 struct ib_umad_file *file = agent->context; in recv_handler()
252 if (rdma_cap_opa_mad(agent->device, agent->port_num)) in recv_handler()
266 ret = ib_init_ah_attr_from_wc(agent->device, agent->port_num, in recv_handler()
282 if (queue_packet(file, agent, packet)) in recv_handler()
498 struct ib_mad_agent *agent; in ib_umad_write() local
535 agent = __get_agent(file, packet->mad.hdr.id); in ib_umad_write()
536 if (!agent) { in ib_umad_write()
542 ah_attr.type = rdma_ah_find_type(agent->device, in ib_umad_write()
557 ah = rdma_create_user_ah(agent->qp->pd, &ah_attr, NULL); in ib_umad_write()
567 && ib_mad_kernel_rmpp_agent(agent)) { in ib_umad_write()
578 packet->msg = ib_create_send_mad(agent, in ib_umad_write()
616 *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 | in ib_umad_write()
621 if (!ib_mad_kernel_rmpp_agent(agent) in ib_umad_write()
683 struct ib_mad_agent *agent = NULL; in ib_umad_reg_agent() local
738 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent()
743 if (IS_ERR(agent)) { in ib_umad_reg_agent()
744 ret = PTR_ERR(agent); in ib_umad_reg_agent()
745 agent = NULL; in ib_umad_reg_agent()
766 file->agent[agent_id] = agent; in ib_umad_reg_agent()
772 if (ret && agent) in ib_umad_reg_agent()
773 ib_unregister_mad_agent(agent); in ib_umad_reg_agent()
784 struct ib_mad_agent *agent = NULL; in ib_umad_reg_agent2() local
851 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent2()
857 if (IS_ERR(agent)) { in ib_umad_reg_agent2()
858 ret = PTR_ERR(agent); in ib_umad_reg_agent2()
859 agent = NULL; in ib_umad_reg_agent2()
875 file->agent[agent_id] = agent; in ib_umad_reg_agent2()
881 if (ret && agent) in ib_umad_reg_agent2()
882 ib_unregister_mad_agent(agent); in ib_umad_reg_agent2()
892 struct ib_mad_agent *agent = NULL; in ib_umad_unreg_agent() local
910 agent = file->agent[id]; in ib_umad_unreg_agent()
911 file->agent[id] = NULL; in ib_umad_unreg_agent()
916 if (agent) in ib_umad_unreg_agent()
917 ib_unregister_mad_agent(agent); in ib_umad_unreg_agent()
1051 if (file->agent[i]) in ib_umad_close()
1052 ib_unregister_mad_agent(file->agent[i]); in ib_umad_close()
1353 if (file->agent[id]) in ib_umad_kill_port()
1354 ib_unregister_mad_agent(file->agent[id]); in ib_umad_kill_port()