Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
[sfrench/cifs-2.6.git] / drivers / infiniband / core / verbs.c
index ccdf93d30b0166a09d4ae237553db33ffe4aebba..05042089de6ea32e3a2c6d585324f9ed9557f4b1 100644 (file)
@@ -248,7 +248,9 @@ int ib_modify_srq(struct ib_srq *srq,
                  struct ib_srq_attr *srq_attr,
                  enum ib_srq_attr_mask srq_attr_mask)
 {
-       return srq->device->modify_srq(srq, srq_attr, srq_attr_mask, NULL);
+       return srq->device->modify_srq ?
+               srq->device->modify_srq(srq, srq_attr, srq_attr_mask, NULL) :
+               -ENOSYS;
 }
 EXPORT_SYMBOL(ib_modify_srq);
 
@@ -609,11 +611,11 @@ EXPORT_SYMBOL(ib_destroy_qp);
 struct ib_cq *ib_create_cq(struct ib_device *device,
                           ib_comp_handler comp_handler,
                           void (*event_handler)(struct ib_event *, void *),
-                          void *cq_context, int cqe)
+                          void *cq_context, int cqe, int comp_vector)
 {
        struct ib_cq *cq;
 
-       cq = device->create_cq(device, cqe, NULL, NULL);
+       cq = device->create_cq(device, cqe, comp_vector, NULL, NULL);
 
        if (!IS_ERR(cq)) {
                cq->device        = device;
@@ -628,6 +630,13 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
 }
 EXPORT_SYMBOL(ib_create_cq);
 
+int ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period)
+{
+       return cq->device->modify_cq ?
+               cq->device->modify_cq(cq, cq_count, cq_period) : -ENOSYS;
+}
+EXPORT_SYMBOL(ib_modify_cq);
+
 int ib_destroy_cq(struct ib_cq *cq)
 {
        if (atomic_read(&cq->usecnt))
@@ -672,6 +681,9 @@ struct ib_mr *ib_reg_phys_mr(struct ib_pd *pd,
 {
        struct ib_mr *mr;
 
+       if (!pd->device->reg_phys_mr)
+               return ERR_PTR(-ENOSYS);
+
        mr = pd->device->reg_phys_mr(pd, phys_buf_array, num_phys_buf,
                                     mr_access_flags, iova_start);