/* Must be called with target->scsi_host->host_lock held to protect req_lim and tx_head.  */
static int __srp_post_send(struct srp_target_port *target, struct srp_iu *iu, int len)
/* Must be called with target->scsi_host->host_lock held to protect req_lim and tx_head.  */
static int __srp_post_send(struct srp_target_port *target, struct srp_iu *iu, int len)
{
	struct ib_sge list;
	struct ib_send_wr wr, *bad_wr;
	int ret = 0;
	list.addr   = iu->dma;
	list.length = len;
	list.lkey   = target->srp_host->srp_dev->mr->lkey;
	wr.next       = NULL;
	wr.wr_id      = target->tx_head & SRP_SQ_SIZE;
	wr.sg_list    = &list;
	wr.num_sge    = 1;
	wr.opcode     = IB_WR_SEND;
	wr.send_flags = IB_SEND_SIGNALED;
	ret = ib_post_send(target->qp, &wr, &bad_wr);
	if (!ret) {
		++target->tx_head;
		--target->req_lim;
	}
	return ret;
}