Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/core/ib_agent.c
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh, | ||||
if (ib_post_send_mad(send_buf, NULL)) { | if (ib_post_send_mad(send_buf, NULL)) { | ||||
dev_err(&device->dev, "ib_post_send_mad error\n"); | dev_err(&device->dev, "ib_post_send_mad error\n"); | ||||
goto err2; | goto err2; | ||||
} | } | ||||
return; | return; | ||||
err2: | err2: | ||||
ib_free_send_mad(send_buf); | ib_free_send_mad(send_buf); | ||||
err1: | err1: | ||||
ib_destroy_ah(ah); | ib_destroy_ah(ah, RDMA_DESTROY_AH_SLEEPABLE); | ||||
} | } | ||||
static void agent_send_handler(struct ib_mad_agent *mad_agent, | static void agent_send_handler(struct ib_mad_agent *mad_agent, | ||||
struct ib_mad_send_wc *mad_send_wc) | struct ib_mad_send_wc *mad_send_wc) | ||||
{ | { | ||||
ib_destroy_ah(mad_send_wc->send_buf->ah); | ib_destroy_ah(mad_send_wc->send_buf->ah, RDMA_DESTROY_AH_SLEEPABLE); | ||||
ib_free_send_mad(mad_send_wc->send_buf); | ib_free_send_mad(mad_send_wc->send_buf); | ||||
} | } | ||||
int ib_agent_port_open(struct ib_device *device, int port_num) | int ib_agent_port_open(struct ib_device *device, int port_num) | ||||
{ | { | ||||
struct ib_agent_port_private *port_priv; | struct ib_agent_port_private *port_priv; | ||||
unsigned long flags; | unsigned long flags; | ||||
int ret; | int ret; | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |