Lines Matching full:agent
42 #include "agent.h"
50 struct ib_mad_agent *agent[2]; member
62 /* Need to check both agent[0] and agent[1], as an agent port in __ib_get_agent_port()
65 if (entry->agent[0] && in __ib_get_agent_port()
66 entry->agent[0]->device == device && in __ib_get_agent_port()
67 entry->agent[0]->port_num == port_num) in __ib_get_agent_port()
70 if (entry->agent[1] && in __ib_get_agent_port()
71 entry->agent[1]->device == device && in __ib_get_agent_port()
72 entry->agent[1]->port_num == port_num) in __ib_get_agent_port()
95 struct ib_mad_agent *agent; in agent_send_response() local
106 dev_err(&device->dev, "Unable to find port agent\n"); in agent_send_response()
110 agent = port_priv->agent[qpn]; in agent_send_response()
111 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); in agent_send_response()
121 send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0, in agent_send_response()
173 /* Obtain send only MAD agent for SMI QP */ in ib_agent_port_open()
174 port_priv->agent[0] = ib_register_mad_agent(device, port_num, in ib_agent_port_open()
178 if (IS_ERR(port_priv->agent[0])) { in ib_agent_port_open()
179 ret = PTR_ERR(port_priv->agent[0]); in ib_agent_port_open()
185 /* Obtain send only MAD agent for GSI QP */ in ib_agent_port_open()
186 port_priv->agent[1] = ib_register_mad_agent(device, port_num, in ib_agent_port_open()
190 if (IS_ERR(port_priv->agent[1])) { in ib_agent_port_open()
191 ret = PTR_ERR(port_priv->agent[1]); in ib_agent_port_open()
203 if (port_priv->agent[0]) in ib_agent_port_open()
204 ib_unregister_mad_agent(port_priv->agent[0]); in ib_agent_port_open()
226 if (port_priv->agent[1]) in ib_agent_port_close()
227 ib_unregister_mad_agent(port_priv->agent[1]); in ib_agent_port_close()
228 if (port_priv->agent[0]) in ib_agent_port_close()
229 ib_unregister_mad_agent(port_priv->agent[0]); in ib_agent_port_close()