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