Lines Matching refs:mad_agent
561 int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent)
567 if (mad_agent->hi_tid) {
568 mad_agent_priv = container_of(mad_agent,
573 mad_snoop_priv = container_of(mad_agent,
857 struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
868 mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private,
873 if ((!mad_agent->rmpp_version &&
892 mad_send_wr->sg_list[0].lkey = mad_agent->mr->lkey;
894 mad_send_wr->sg_list[1].lkey = mad_agent->mr->lkey;
913 mad_send_wr->send_buf.mad_agent = mad_agent;
985 mad_agent_priv = container_of(send_buf->mad_agent,
1001 struct ib_mad_agent *mad_agent;
1011 mad_agent = mad_send_wr->send_buf.mad_agent;
1013 sge[0].addr = ib_dma_map_single(mad_agent->device,
1019 sge[1].addr = ib_dma_map_single(mad_agent->device,
1027 ret = ib_post_send(mad_agent->qp, &mad_send_wr->send_wr,
1041 ib_dma_unmap_single(mad_agent->device,
1044 ib_dma_unmap_single(mad_agent->device,
1072 if (!send_buf->mad_agent->send_handler ||
1074 !send_buf->mad_agent->recv_handler)) {
1182 int ib_process_mad_wc(struct ib_mad_agent *mad_agent,
1554 struct ib_mad_agent_private *mad_agent = NULL;
1569 mad_agent = entry;
1595 mad_agent = method->agent[mad->mad_hdr.method &
1613 mad_agent = method->agent[mad->mad_hdr.method &
1619 if (mad_agent) {
1620 if (mad_agent->agent.recv_handler)
1621 atomic_inc(&mad_agent->refcount);
1625 &mad_agent->agent, port_priv->port_num);
1626 mad_agent = NULL;
1632 return mad_agent;
1841 struct ib_mad_agent_private *mad_agent;
1947 mad_agent = find_mad_agent(port_priv, &recv->mad.mad);
1948 if (mad_agent) {
1949 ib_mad_complete_recv(mad_agent, &recv->header.recv_wc);
2107 ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device,
2110 ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device,
2307 int ib_modify_mad(struct ib_mad_agent *mad_agent,
2315 mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private,
2341 void ib_cancel_mad(struct ib_mad_agent *mad_agent,
2344 ib_modify_mad(mad_agent, send_buf, 0);