Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
drivers
/
infiniband
/
core
/
ucm.c
diff --git
a/kernel/drivers/infiniband/core/ucm.c
b/kernel/drivers/infiniband/core/ucm.c
index
f2f6393
..
6b4e8a0
100644
(file)
--- a/
kernel/drivers/infiniband/core/ucm.c
+++ b/
kernel/drivers/infiniband/core/ucm.c
@@
-109,7
+109,7
@@
enum {
#define IB_UCM_BASE_DEV MKDEV(IB_UCM_MAJOR, IB_UCM_BASE_MINOR)
static void ib_ucm_add_one(struct ib_device *device);
#define IB_UCM_BASE_DEV MKDEV(IB_UCM_MAJOR, IB_UCM_BASE_MINOR)
static void ib_ucm_add_one(struct ib_device *device);
-static void ib_ucm_remove_one(struct ib_device *device);
+static void ib_ucm_remove_one(struct ib_device *device
, void *client_data
);
static struct ib_client ucm_client = {
.name = "ucm",
static struct ib_client ucm_client = {
.name = "ucm",
@@
-658,8
+658,7
@@
static ssize_t ib_ucm_listen(struct ib_ucm_file *file,
if (result)
goto out;
if (result)
goto out;
- result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask,
- NULL);
+ result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask);
out:
ib_ucm_ctx_put(ctx);
return result;
out:
ib_ucm_ctx_put(ctx);
return result;
@@
-1193,6
+1192,7
@@
static int ib_ucm_close(struct inode *inode, struct file *filp)
return 0;
}
return 0;
}
+static DECLARE_BITMAP(overflow_map, IB_UCM_MAX_DEVICES);
static void ib_ucm_release_dev(struct device *dev)
{
struct ib_ucm_device *ucm_dev;
static void ib_ucm_release_dev(struct device *dev)
{
struct ib_ucm_device *ucm_dev;
@@
-1202,7
+1202,7
@@
static void ib_ucm_release_dev(struct device *dev)
if (ucm_dev->devnum < IB_UCM_MAX_DEVICES)
clear_bit(ucm_dev->devnum, dev_map);
else
if (ucm_dev->devnum < IB_UCM_MAX_DEVICES)
clear_bit(ucm_dev->devnum, dev_map);
else
- clear_bit(ucm_dev->devnum - IB_UCM_MAX_DEVICES,
dev
_map);
+ clear_bit(ucm_dev->devnum - IB_UCM_MAX_DEVICES,
overflow
_map);
kfree(ucm_dev);
}
kfree(ucm_dev);
}
@@
-1226,7
+1226,6
@@
static ssize_t show_ibdev(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR(ibdev, S_IRUGO, show_ibdev, NULL);
static dev_t overflow_maj;
static DEVICE_ATTR(ibdev, S_IRUGO, show_ibdev, NULL);
static dev_t overflow_maj;
-static DECLARE_BITMAP(overflow_map, IB_UCM_MAX_DEVICES);
static int find_overflow_devnum(void)
{
int ret;
static int find_overflow_devnum(void)
{
int ret;
@@
-1253,8
+1252,7
@@
static void ib_ucm_add_one(struct ib_device *device)
dev_t base;
struct ib_ucm_device *ucm_dev;
dev_t base;
struct ib_ucm_device *ucm_dev;
- if (!device->alloc_ucontext ||
- rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
+ if (!device->alloc_ucontext || !rdma_cap_ib_cm(device, 1))
return;
ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL);
return;
ucm_dev = kzalloc(sizeof *ucm_dev, GFP_KERNEL);
@@
-1311,9
+1309,9
@@
err:
return;
}
return;
}
-static void ib_ucm_remove_one(struct ib_device *device)
+static void ib_ucm_remove_one(struct ib_device *device
, void *client_data
)
{
{
- struct ib_ucm_device *ucm_dev =
ib_get_client_data(device, &ucm_client)
;
+ struct ib_ucm_device *ucm_dev =
client_data
;
if (!ucm_dev)
return;
if (!ucm_dev)
return;