Lines Matching defs:agent
119 struct ib_mad_agent *agent[IB_UMAD_MAX_AGENTS];
161 return file->agents_dead ? NULL : file->agent[id];
165 struct ib_mad_agent *agent,
175 if (agent == __get_agent(file, packet->mad.hdr.id)) {
196 static void send_handler(struct ib_mad_agent *agent,
199 struct ib_umad_file *file = agent->context;
209 if (!queue_packet(file, agent, packet))
215 static void recv_handler(struct ib_mad_agent *agent,
218 struct ib_umad_file *file = agent->context;
242 ib_init_ah_from_wc(agent->device, agent->port_num,
253 if (queue_packet(file, agent, packet))
450 struct ib_mad_agent *agent;
484 agent = __get_agent(file, packet->mad.hdr.id);
485 if (!agent) {
504 ah = ib_create_ah(agent->qp->pd, &ah_attr);
522 packet->msg = ib_create_send_mad(agent,
559 *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 |
614 struct ib_mad_agent *agent = NULL;
661 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num,
666 if (IS_ERR(agent)) {
667 ret = PTR_ERR(agent);
668 agent = NULL;
688 file->agent[agent_id] = agent;
694 if (ret && agent)
695 ib_unregister_mad_agent(agent);
704 struct ib_mad_agent *agent = NULL;
719 agent = file->agent[id];
720 file->agent[id] = NULL;
725 if (agent)
726 ib_unregister_mad_agent(agent);
864 if (file->agent[i])
865 ib_unregister_mad_agent(file->agent[i]);
1104 if (file->agent[id])
1105 ib_unregister_mad_agent(file->agent[id]);