Lines Matching refs:agent

118 	struct ib_mad_agent    *agent[IB_UMAD_MAX_AGENTS];
163 return file->agents_dead ? NULL : file->agent[id];
167 struct ib_mad_agent *agent,
177 if (agent == __get_agent(file, packet->mad.hdr.id)) {
197 static void send_handler(struct ib_mad_agent *agent,
200 struct ib_umad_file *file = agent->context;
210 if (!queue_packet(file, agent, packet))
216 static void recv_handler(struct ib_mad_agent *agent,
220 struct ib_umad_file *file = agent->context;
245 ret = ib_init_ah_from_wc(agent->device, agent->port_num,
258 if (queue_packet(file, agent, packet))
458 struct ib_mad_agent *agent;
492 agent = __get_agent(file, packet->mad.hdr.id);
493 if (!agent) {
512 ah = ib_create_ah(agent->qp->pd, &ah_attr);
522 && ib_mad_kernel_rmpp_agent(agent)) {
533 packet->msg = ib_create_send_mad(agent,
571 *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 |
576 if (!ib_mad_kernel_rmpp_agent(agent)
634 struct ib_mad_agent *agent = NULL;
690 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num,
695 if (IS_ERR(agent)) {
696 ret = PTR_ERR(agent);
697 agent = NULL;
718 file->agent[agent_id] = agent;
724 if (ret && agent)
725 ib_unregister_mad_agent(agent);
736 struct ib_mad_agent *agent = NULL;
807 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num,
813 if (IS_ERR(agent)) {
814 ret = PTR_ERR(agent);
815 agent = NULL;
831 file->agent[agent_id] = agent;
837 if (ret && agent)
838 ib_unregister_mad_agent(agent);
848 struct ib_mad_agent *agent = NULL;
863 agent = file->agent[id];
864 file->agent[id] = NULL;
869 if (agent)
870 ib_unregister_mad_agent(agent);
1005 if (file->agent[i])
1006 ib_unregister_mad_agent(file->agent[i]);
1274 if (file->agent[id])
1275 ib_unregister_mad_agent(file->agent[id]);