Lines Matching refs:agent
113 struct ib_mad_agent *agent[IB_UMAD_MAX_AGENTS]; member
154 return file->agents_dead ? NULL : file->agent[id]; in __get_agent()
158 struct ib_mad_agent *agent, in queue_packet() argument
168 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
188 static void send_handler(struct ib_mad_agent *agent, in send_handler() argument
191 struct ib_umad_file *file = agent->context; in send_handler()
201 if (!queue_packet(file, agent, packet)) in send_handler()
207 static void recv_handler(struct ib_mad_agent *agent, in recv_handler() argument
210 struct ib_umad_file *file = agent->context; in recv_handler()
234 ib_init_ah_from_wc(agent->device, agent->port_num, in recv_handler()
245 if (queue_packet(file, agent, packet)) in recv_handler()
442 struct ib_mad_agent *agent; in ib_umad_write() local
476 agent = __get_agent(file, packet->mad.hdr.id); in ib_umad_write()
477 if (!agent) { in ib_umad_write()
496 ah = ib_create_ah(agent->qp->pd, &ah_attr); in ib_umad_write()
514 packet->msg = ib_create_send_mad(agent, in ib_umad_write()
551 *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 | in ib_umad_write()
606 struct ib_mad_agent *agent = NULL; in ib_umad_reg_agent() local
653 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent()
658 if (IS_ERR(agent)) { in ib_umad_reg_agent()
659 ret = PTR_ERR(agent); in ib_umad_reg_agent()
660 agent = NULL; in ib_umad_reg_agent()
680 file->agent[agent_id] = agent; in ib_umad_reg_agent()
686 if (ret && agent) in ib_umad_reg_agent()
687 ib_unregister_mad_agent(agent); in ib_umad_reg_agent()
696 struct ib_mad_agent *agent = NULL; in ib_umad_unreg_agent() local
711 agent = file->agent[id]; in ib_umad_unreg_agent()
712 file->agent[id] = NULL; in ib_umad_unreg_agent()
717 if (agent) in ib_umad_unreg_agent()
718 ib_unregister_mad_agent(agent); in ib_umad_unreg_agent()
850 if (file->agent[i]) in ib_umad_close()
851 ib_unregister_mad_agent(file->agent[i]); in ib_umad_close()
1109 if (file->agent[id]) in ib_umad_kill_port()
1110 ib_unregister_mad_agent(file->agent[id]); in ib_umad_kill_port()