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

Commit 5ad58728 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  MAINTAINERS: neteffect update
  RDMA/nes: Fix interrupt moderation low threshold
  RDMA/nes: Fix CRC endianness for RDMA connection establishment on big-endian
  RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()
  RDMA/nes: Fix use-after-free in nes_create_cq()
  RDMA/nes: Fix a check-after-use in nes_probe()
  RDMA/nes: Fix a memory leak in schedule_nes_timer()
  RDMA/nes: Fix off-by-one
  RDMA/nes: Resurrect error path dead code
  RDMA/cxgb3: Fix shift calc in build_phys_page_list() for 1-entry page lists
parents f511d7ed 030f1b2f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2744,6 +2744,8 @@ S: Maintained
NETEFFECT IWARP RNIC DRIVER (IW_NES)
P:	Faisal Latif
M:	flatif@neteffect.com
P:	Nishi Gupta
M:	ngupta@neteffect.com
P:	Glenn Streiff
M:	gstreiff@neteffect.com
L:	general@lists.openfabrics.org
+2 −8
Original line number Diff line number Diff line
@@ -136,14 +136,8 @@ int build_phys_page_list(struct ib_phys_buf *buffer_list,

	/* Find largest page shift we can use to cover buffers */
	for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift))
		if (num_phys_buf > 1) {
		if ((1ULL << *shift) & mask)
			break;
		} else
			if (1ULL << *shift >=
			    buffer_list[0].size +
			    (buffer_list[0].addr & ((1ULL << *shift) - 1)))
				break;

	buffer_list[0].size += buffer_list[0].addr & ((1ULL << *shift) - 1);
	buffer_list[0].addr &= ~0ull << *shift;
+1 −1
Original line number Diff line number Diff line
@@ -567,12 +567,12 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i

	/* Init the adapter */
	nesdev->nesadapter = nes_init_adapter(nesdev, hw_rev);
	nesdev->nesadapter->et_rx_coalesce_usecs_irq = interrupt_mod_interval;
	if (!nesdev->nesadapter) {
		printk(KERN_ERR PFX "Unable to initialize adapter.\n");
		ret = -ENOMEM;
		goto bail5;
	}
	nesdev->nesadapter->et_rx_coalesce_usecs_irq = interrupt_mod_interval;

	/* nesdev->base_doorbell_index =
			nesdev->nesadapter->pd_config_base[PCI_FUNC(nesdev->pcidev->devfn)]; */
+15 −0
Original line number Diff line number Diff line
@@ -285,6 +285,21 @@ struct nes_device {
};


static inline __le32 get_crc_value(struct nes_v4_quad *nes_quad)
{
	u32 crc_value;
	crc_value = crc32c(~0, (void *)nes_quad, sizeof (struct nes_v4_quad));

	/*
	 * With commit ef19454b ("[LIB] crc32c: Keep intermediate crc
	 * state in cpu order"), behavior of crc32c changes on
	 * big-endian platforms.  Our algorithm expects the previous
	 * behavior; otherwise we have RDMA connection establishment
	 * issue on big-endian.
	 */
	return cpu_to_le32(crc_value);
}

static inline void
set_wqe_64bit_value(__le32 *wqe_words, u32 index, u64 value)
{
+9 −6
Original line number Diff line number Diff line
@@ -370,11 +370,11 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
	int ret = 0;
	u32 was_timer_set;

	if (!cm_node)
		return -EINVAL;
	new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC);
	if (!new_send)
		return -1;
	if (!cm_node)
		return -EINVAL;

	/* new_send->timetosend = currenttime */
	new_send->retrycount = NES_DEFAULT_RETRYS;
@@ -947,6 +947,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core,
		nes_debug(NES_DBG_CM, "destroying listener (%p)\n", listener);

		kfree(listener);
		listener = NULL;
		ret = 0;
		cm_listens_destroyed++;
	} else {
@@ -2319,6 +2320,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
	struct iw_cm_event cm_event;
	struct nes_hw_qp_wqe *wqe;
	struct nes_v4_quad nes_quad;
	u32 crc_value;
	int ret;

	ibqp = nes_get_qp(cm_id->device, conn_param->qpn);
@@ -2435,8 +2437,8 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
	nes_quad.TcpPorts[1]   = cm_id->local_addr.sin_port;

	/* Produce hash key */
	nesqp->hte_index = cpu_to_be32(
			crc32c(~0, (void *)&nes_quad, sizeof(nes_quad)) ^ 0xffffffff);
	crc_value = get_crc_value(&nes_quad);
	nesqp->hte_index = cpu_to_be32(crc_value ^ 0xffffffff);
	nes_debug(NES_DBG_CM, "HTE Index = 0x%08X, CRC = 0x%08X\n",
			nesqp->hte_index, nesqp->hte_index & adapter->hte_index_mask);

@@ -2750,6 +2752,7 @@ void cm_event_connected(struct nes_cm_event *event)
	struct iw_cm_event cm_event;
	struct nes_hw_qp_wqe *wqe;
	struct nes_v4_quad nes_quad;
	u32 crc_value;
	int ret;

	/* get all our handles */
@@ -2827,8 +2830,8 @@ void cm_event_connected(struct nes_cm_event *event)
	nes_quad.TcpPorts[1] = cm_id->local_addr.sin_port;

	/* Produce hash key */
	nesqp->hte_index = cpu_to_be32(
			crc32c(~0, (void *)&nes_quad, sizeof(nes_quad)) ^ 0xffffffff);
	crc_value = get_crc_value(&nes_quad);
	nesqp->hte_index = cpu_to_be32(crc_value ^ 0xffffffff);
	nes_debug(NES_DBG_CM, "HTE Index = 0x%08X, After CRC = 0x%08X\n",
			nesqp->hte_index, nesqp->hte_index & nesadapter->hte_index_mask);

Loading