isert-scst: Linux kernel v4.2 ib_create_cq() build fix

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-07-14 23:57:42 +00:00
parent 0651bc1e4e
commit 6c0a869007
+14
View File
@@ -871,12 +871,26 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev)
goto fail_cq;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
cq = ib_create_cq(ib_dev,
isert_cq_comp_handler,
isert_async_evt_handler,
cq_desc, /* context */
cqe_num,
i); /* completion vector */
#else
{
struct ib_cq_init_attr ia = {
.cqe = cqe_num,
.comp_vector = i,
};
cq = ib_create_cq(ib_dev,
isert_cq_comp_handler,
isert_async_evt_handler,
cq_desc, /* context */
&ia);
}
#endif
if (unlikely(IS_ERR(cq))) {
cq_desc->cq = NULL;
err = PTR_ERR(cq);