]> err.no Git - linux-2.6/blobdiff - drivers/infiniband/core/verbs.c
libata-sff: improve HSM violation reporting
[linux-2.6] / drivers / infiniband / core / verbs.c
index 8b5dd3649bbf37e8c0679393506a30a46d879e38..05042089de6ea32e3a2c6d585324f9ed9557f4b1 100644 (file)
@@ -167,7 +167,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
                ah_attr->grh.sgid_index = (u8) gid_index;
                flow_class = be32_to_cpu(grh->version_tclass_flow);
                ah_attr->grh.flow_label = flow_class & 0xFFFFF;
-               ah_attr->grh.hop_limit = grh->hop_limit;
+               ah_attr->grh.hop_limit = 0xFF;
                ah_attr->grh.traffic_class = (flow_class >> 20) & 0xFF;
        }
        return 0;
@@ -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);