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

Commit 8dc4abdf authored by Roland Dreier's avatar Roland Dreier
Browse files

Merge branches 'cma', 'cxgb3', 'cxgb4', 'misc', 'nes', 'netlink', 'srp' and 'uverbs' into for-next

Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@ menuconfig INFINIBAND
	tristate "InfiniBand support"
	tristate "InfiniBand support"
	depends on PCI || BROKEN
	depends on PCI || BROKEN
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	depends on NET
	---help---
	---help---
	  Core support for InfiniBand (IB).  Make sure to also select
	  Core support for InfiniBand (IB).  Make sure to also select
	  any protocols you wish to use as well as drivers for your
	  any protocols you wish to use as well as drivers for your
+1 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o ib_ucm.o \
					$(user_access-y)
					$(user_access-y)


ib_core-y :=			packer.o ud_header.o verbs.o sysfs.o \
ib_core-y :=			packer.o ud_header.o verbs.o sysfs.o \
				device.o fmr_pool.o cache.o
				device.o fmr_pool.o cache.o netlink.o
ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o
ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o


ib_mad-y :=			mad.o smi.o agent.o mad_rmpp.o
ib_mad-y :=			mad.o smi.o agent.o mad_rmpp.o
+8 −0
Original line number Original line Diff line number Diff line
@@ -3639,8 +3639,16 @@ static struct kobj_type cm_port_obj_type = {
	.release = cm_release_port_obj
	.release = cm_release_port_obj
};
};


static char *cm_devnode(struct device *dev, mode_t *mode)
{
	*mode = 0666;
	return kasprintf(GFP_KERNEL, "infiniband/%s", dev_name(dev));
}

struct class cm_class = {
struct class cm_class = {
	.owner   = THIS_MODULE,
	.name    = "infiniband_cm",
	.name    = "infiniband_cm",
	.devnode = cm_devnode,
};
};
EXPORT_SYMBOL(cm_class);
EXPORT_SYMBOL(cm_class);


+200 −108

File changed.

Preview size limit exceeded, changes collapsed.

+22 −3
Original line number Original line Diff line number Diff line
@@ -38,6 +38,7 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <rdma/rdma_netlink.h>


#include "core_priv.h"
#include "core_priv.h"


@@ -725,22 +726,40 @@ static int __init ib_core_init(void)
		return -ENOMEM;
		return -ENOMEM;


	ret = ib_sysfs_setup();
	ret = ib_sysfs_setup();
	if (ret)
	if (ret) {
		printk(KERN_WARNING "Couldn't create InfiniBand device class\n");
		printk(KERN_WARNING "Couldn't create InfiniBand device class\n");
		goto err;
	}

	ret = ibnl_init();
	if (ret) {
		printk(KERN_WARNING "Couldn't init IB netlink interface\n");
		goto err_sysfs;
	}


	ret = ib_cache_setup();
	ret = ib_cache_setup();
	if (ret) {
	if (ret) {
		printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
		printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
		ib_sysfs_cleanup();
		goto err_nl;
		destroy_workqueue(ib_wq);
	}
	}


	return 0;

err_nl:
	ibnl_cleanup();

err_sysfs:
	ib_sysfs_cleanup();

err:
	destroy_workqueue(ib_wq);
	return ret;
	return ret;
}
}


static void __exit ib_core_cleanup(void)
static void __exit ib_core_cleanup(void)
{
{
	ib_cache_cleanup();
	ib_cache_cleanup();
	ibnl_cleanup();
	ib_sysfs_cleanup();
	ib_sysfs_cleanup();
	/* Make sure that any pending umem accounting work is done. */
	/* Make sure that any pending umem accounting work is done. */
	destroy_workqueue(ib_wq);
	destroy_workqueue(ib_wq);
Loading