Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1ef951e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Make sure struct ipoib_neigh.queue is always initialized
  IB/iser: Use the new verbs DMA mapping functions
  IB/srp: Use new verbs IB DMA mapping functions
  IPoIB: Use the new verbs DMA mapping functions
  IB/core: Use the new verbs DMA mapping functions
  IB/ipath: Implement new verbs DMA mapping functions
  IB: Add DMA mapping functions to allow device drivers to interpose
  RDMA/cma: Export rdma cm interface to userspace
  RDMA/cma: Add support for RDMA_PS_UDP
  RDMA/cma: Allow early transition to RTS to handle lost CM messages
  RDMA/cma: Report connect info with connect events
  RDMA/cma: Remove unneeded qp_type parameter from rdma_cm
  IB/ipath: Fix IRQ for PCI Express HCAs
  RDMA/amso1100: Fix memory leak in c2_qp_modify()
  IB/iser: Remove unused "write-only" variables
  IB/ipath: Remove unused "write-only" variables
  IB/fmr: ib_flush_fmr_pool() may wait too long
parents 775ba7ad 82b39913
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS)	:= ib_addr.o rdma_cm.o
user_access-$(CONFIG_INFINIBAND_ADDR_TRANS)	:= rdma_ucm.o

obj-$(CONFIG_INFINIBAND) +=		ib_core.o ib_mad.o ib_sa.o \
					ib_cm.o iw_cm.o $(infiniband-y)
obj-$(CONFIG_INFINIBAND_USER_MAD) +=	ib_umad.o
obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o
obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o \
					$(user_access-y)

ib_core-y :=			packer.o ud_header.o verbs.o sysfs.o \
				device.o fmr_pool.o cache.o
@@ -18,6 +20,8 @@ iw_cm-y := iwcm.o

rdma_cm-y :=			cma.o

rdma_ucm-y :=			ucma.o

ib_addr-y :=			addr.o

ib_umad-y :=			user_mad.o
+4 −0
Original line number Diff line number Diff line
@@ -3289,6 +3289,10 @@ static int cm_init_qp_rts_attr(struct cm_id_private *cm_id_priv,

	spin_lock_irqsave(&cm_id_priv->lock, flags);
	switch (cm_id_priv->id.state) {
	/* Allow transition to RTS before sending REP */
	case IB_CM_REQ_RCVD:
	case IB_CM_MRA_REQ_SENT:

	case IB_CM_REP_RCVD:
	case IB_CM_MRA_REP_SENT:
	case IB_CM_REP_SENT:
+324 −92

File changed.

Preview size limit exceeded, changes collapsed.

+2 −10
Original line number Diff line number Diff line
@@ -394,20 +394,12 @@ EXPORT_SYMBOL(ib_destroy_fmr_pool);
 */
int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
{
	int serial;

	atomic_inc(&pool->req_ser);
	/*
	 * It's OK if someone else bumps req_ser again here -- we'll
	 * just wait a little longer.
	 */
	serial = atomic_read(&pool->req_ser);
	int serial = atomic_inc_return(&pool->req_ser);

	wake_up_process(pool->thread);

	if (wait_event_interruptible(pool->force_wait,
				     atomic_read(&pool->flush_ser) -
				     atomic_read(&pool->req_ser) >= 0))
				     atomic_read(&pool->flush_ser) - serial >= 0))
		return -EINTR;

	return 0;
+44 −46
Original line number Diff line number Diff line
@@ -998,17 +998,17 @@ int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr)

	mad_agent = mad_send_wr->send_buf.mad_agent;
	sge = mad_send_wr->sg_list;
	sge[0].addr = dma_map_single(mad_agent->device->dma_device,
	sge[0].addr = ib_dma_map_single(mad_agent->device,
					mad_send_wr->send_buf.mad,
					sge[0].length,
					DMA_TO_DEVICE);
	pci_unmap_addr_set(mad_send_wr, header_mapping, sge[0].addr);
	mad_send_wr->header_mapping = sge[0].addr;

	sge[1].addr = dma_map_single(mad_agent->device->dma_device,
	sge[1].addr = ib_dma_map_single(mad_agent->device,
					ib_get_payload(mad_send_wr),
					sge[1].length,
					DMA_TO_DEVICE);
	pci_unmap_addr_set(mad_send_wr, payload_mapping, sge[1].addr);
	mad_send_wr->payload_mapping = sge[1].addr;

	spin_lock_irqsave(&qp_info->send_queue.lock, flags);
	if (qp_info->send_queue.count < qp_info->send_queue.max_active) {
@@ -1026,11 +1026,11 @@ int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr)
	}
	spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
	if (ret) {
		dma_unmap_single(mad_agent->device->dma_device,
				 pci_unmap_addr(mad_send_wr, header_mapping),
		ib_dma_unmap_single(mad_agent->device,
				    mad_send_wr->header_mapping,
				    sge[0].length, DMA_TO_DEVICE);
		dma_unmap_single(mad_agent->device->dma_device,
				 pci_unmap_addr(mad_send_wr, payload_mapping),
		ib_dma_unmap_single(mad_agent->device,
				    mad_send_wr->payload_mapping,
				    sge[1].length, DMA_TO_DEVICE);
	}
	return ret;
@@ -1850,8 +1850,8 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
	mad_priv_hdr = container_of(mad_list, struct ib_mad_private_header,
				    mad_list);
	recv = container_of(mad_priv_hdr, struct ib_mad_private, header);
	dma_unmap_single(port_priv->device->dma_device,
			 pci_unmap_addr(&recv->header, mapping),
	ib_dma_unmap_single(port_priv->device,
			    recv->header.mapping,
			    sizeof(struct ib_mad_private) -
			      sizeof(struct ib_mad_private_header),
			    DMA_FROM_DEVICE);
@@ -2080,11 +2080,11 @@ static void ib_mad_send_done_handler(struct ib_mad_port_private *port_priv,
	qp_info = send_queue->qp_info;

retry:
	dma_unmap_single(mad_send_wr->send_buf.mad_agent->device->dma_device,
			 pci_unmap_addr(mad_send_wr, header_mapping),
	ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device,
			    mad_send_wr->header_mapping,
			    mad_send_wr->sg_list[0].length, DMA_TO_DEVICE);
	dma_unmap_single(mad_send_wr->send_buf.mad_agent->device->dma_device,
			 pci_unmap_addr(mad_send_wr, payload_mapping),
	ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device,
			    mad_send_wr->payload_mapping,
			    mad_send_wr->sg_list[1].length, DMA_TO_DEVICE);
	queued_send_wr = NULL;
	spin_lock_irqsave(&send_queue->lock, flags);
@@ -2528,13 +2528,12 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
				break;
			}
		}
		sg_list.addr = dma_map_single(qp_info->port_priv->
					        device->dma_device,
		sg_list.addr = ib_dma_map_single(qp_info->port_priv->device,
						 &mad_priv->grh,
						 sizeof *mad_priv -
						   sizeof mad_priv->header,
						 DMA_FROM_DEVICE);
		pci_unmap_addr_set(&mad_priv->header, mapping, sg_list.addr);
		mad_priv->header.mapping = sg_list.addr;
		recv_wr.wr_id = (unsigned long)&mad_priv->header.mad_list;
		mad_priv->header.mad_list.mad_queue = recv_queue;

@@ -2549,9 +2548,8 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
			list_del(&mad_priv->header.mad_list.list);
			recv_queue->count--;
			spin_unlock_irqrestore(&recv_queue->lock, flags);
			dma_unmap_single(qp_info->port_priv->device->dma_device,
					 pci_unmap_addr(&mad_priv->header,
							mapping),
			ib_dma_unmap_single(qp_info->port_priv->device,
					    mad_priv->header.mapping,
					    sizeof *mad_priv -
					      sizeof mad_priv->header,
					    DMA_FROM_DEVICE);
@@ -2586,8 +2584,8 @@ static void cleanup_recv_queue(struct ib_mad_qp_info *qp_info)
		/* Remove from posted receive MAD list */
		list_del(&mad_list->list);

		dma_unmap_single(qp_info->port_priv->device->dma_device,
				 pci_unmap_addr(&recv->header, mapping),
		ib_dma_unmap_single(qp_info->port_priv->device,
				    recv->header.mapping,
				    sizeof(struct ib_mad_private) -
				      sizeof(struct ib_mad_private_header),
				    DMA_FROM_DEVICE);
Loading