Lines Matching refs:port_priv
85 struct ib_agent_port_private *port_priv; in agent_send_response() local
92 port_priv = ib_get_agent_port(device, 0); in agent_send_response()
94 port_priv = ib_get_agent_port(device, port_num); in agent_send_response()
96 if (!port_priv) { in agent_send_response()
101 agent = port_priv->agent[qpn]; in agent_send_response()
152 struct ib_agent_port_private *port_priv; in ib_agent_port_open() local
157 port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL); in ib_agent_port_open()
158 if (!port_priv) { in ib_agent_port_open()
165 port_priv->agent[0] = ib_register_mad_agent(device, port_num, in ib_agent_port_open()
169 if (IS_ERR(port_priv->agent[0])) { in ib_agent_port_open()
170 ret = PTR_ERR(port_priv->agent[0]); in ib_agent_port_open()
176 port_priv->agent[1] = ib_register_mad_agent(device, port_num, in ib_agent_port_open()
180 if (IS_ERR(port_priv->agent[1])) { in ib_agent_port_open()
181 ret = PTR_ERR(port_priv->agent[1]); in ib_agent_port_open()
186 list_add_tail(&port_priv->port_list, &ib_agent_port_list); in ib_agent_port_open()
192 if (port_priv->agent[0]) in ib_agent_port_open()
193 ib_unregister_mad_agent(port_priv->agent[0]); in ib_agent_port_open()
195 kfree(port_priv); in ib_agent_port_open()
202 struct ib_agent_port_private *port_priv; in ib_agent_port_close() local
206 port_priv = __ib_get_agent_port(device, port_num); in ib_agent_port_close()
207 if (port_priv == NULL) { in ib_agent_port_close()
212 list_del(&port_priv->port_list); in ib_agent_port_close()
215 ib_unregister_mad_agent(port_priv->agent[1]); in ib_agent_port_close()
216 if (port_priv->agent[0]) in ib_agent_port_close()
217 ib_unregister_mad_agent(port_priv->agent[0]); in ib_agent_port_close()
219 kfree(port_priv); in ib_agent_port_close()