Lines Matching refs:mad_agent
417 static void srpt_mad_send_handler(struct ib_mad_agent *mad_agent, in srpt_mad_send_handler() argument
427 static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent, in srpt_mad_recv_handler() argument
431 struct srpt_port *sport = (struct srpt_port *)mad_agent->context; in srpt_mad_recv_handler()
439 ah = ib_create_ah_from_wc(mad_agent->qp->pd, mad_wc->wc, in srpt_mad_recv_handler()
440 mad_wc->recv_buf.grh, mad_agent->port_num); in srpt_mad_recv_handler()
446 rsp = ib_create_send_mad(mad_agent, mad_wc->wc->src_qp, in srpt_mad_recv_handler()
538 if (!sport->mad_agent) { in srpt_refresh_port()
545 sport->mad_agent = ib_register_mad_agent(sport->sdev->device, in srpt_refresh_port()
552 if (IS_ERR(sport->mad_agent)) { in srpt_refresh_port()
553 ret = PTR_ERR(sport->mad_agent); in srpt_refresh_port()
554 sport->mad_agent = NULL; in srpt_refresh_port()
590 if (sport->mad_agent) { in srpt_unregister_mad_agent()
591 ib_unregister_mad_agent(sport->mad_agent); in srpt_unregister_mad_agent()
592 sport->mad_agent = NULL; in srpt_unregister_mad_agent()