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

Commit 6845a44a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA: Update workqueue usage
  RDMA/nes: Fix incorrect SFP+ link status detection on driver init
  RDMA/nes: Fix SFP+ link down detection issue with switch port disable
  RDMA/nes: Generate IB_EVENT_PORT_ERR/PORT_ACTIVE events
  RDMA/nes: Fix bonding on iw_nes
  IB/srp: Test only once whether iu allocation succeeded
  IB/mlx4: Handle protocol field in multicast table
  RDMA: Use vzalloc() to replace vmalloc()+memset(0)
  mlx4_{core, ib, en}: Fix driver when sizeof (phys_addr_t) > sizeof (long)
  IB/mthca: Fix driver when sizeof (phys_addr_t) > sizeof (long)
parents eee2a817 4790f4dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static void ib_cache_event(struct ib_event_handler *handler,
			INIT_WORK(&work->work, ib_cache_task);
			work->device   = event->device;
			work->port_num = event->element.port_num;
			schedule_work(&work->work);
			queue_work(ib_wq, &work->work);
		}
	}
}
@@ -368,7 +368,7 @@ static void ib_cache_cleanup_one(struct ib_device *device)
	int p;

	ib_unregister_event_handler(&device->cache.event_handler);
	flush_scheduled_work();
	flush_workqueue(ib_wq);

	for (p = 0; p <= end_port(device) - start_port(device); ++p) {
		kfree(device->cache.pkey_cache[p]);
+9 −2
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>

#include "core_priv.h"

@@ -52,6 +51,9 @@ struct ib_client_data {
	void *            data;
};

struct workqueue_struct *ib_wq;
EXPORT_SYMBOL_GPL(ib_wq);

static LIST_HEAD(device_list);
static LIST_HEAD(client_list);

@@ -718,6 +720,10 @@ static int __init ib_core_init(void)
{
	int ret;

	ib_wq = alloc_workqueue("infiniband", 0, 0);
	if (!ib_wq)
		return -ENOMEM;

	ret = ib_sysfs_setup();
	if (ret)
		printk(KERN_WARNING "Couldn't create InfiniBand device class\n");
@@ -726,6 +732,7 @@ static int __init ib_core_init(void)
	if (ret) {
		printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
		ib_sysfs_cleanup();
		destroy_workqueue(ib_wq);
	}

	return ret;
@@ -736,7 +743,7 @@ static void __exit ib_core_cleanup(void)
	ib_cache_cleanup();
	ib_sysfs_cleanup();
	/* Make sure that any pending umem accounting work is done. */
	flush_scheduled_work();
	destroy_workqueue(ib_wq);
}

module_init(ib_core_init);
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
		port->sm_ah = NULL;
		spin_unlock_irqrestore(&port->ah_lock, flags);

		schedule_work(&sa_dev->port[event->element.port_num -
		queue_work(ib_wq, &sa_dev->port[event->element.port_num -
					    sa_dev->start_port].update_task);
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ void ib_umem_release(struct ib_umem *umem)
			umem->mm   = mm;
			umem->diff = diff;

			schedule_work(&umem->work);
			queue_work(ib_wq, &umem->work);
			return;
		}
	} else
+2 −3
Original line number Diff line number Diff line
@@ -459,13 +459,12 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
	     IB_DEVICE_MEM_WINDOW);

	/* Allocate the qptr_array */
	c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *));
	c2dev->qptr_array = vzalloc(C2_MAX_CQS * sizeof(void *));
	if (!c2dev->qptr_array) {
		return -ENOMEM;
	}

	/* Inialize the qptr_array */
	memset(c2dev->qptr_array, 0, C2_MAX_CQS * sizeof(void *));
	/* Initialize the qptr_array */
	c2dev->qptr_array[0] = (void *) &c2dev->req_vq;
	c2dev->qptr_array[1] = (void *) &c2dev->rep_vq;
	c2dev->qptr_array[2] = (void *) &c2dev->aeq;
Loading