Roland,

Here is a patch that allows me to remove all the stub/ENOSYS methods
from the chelsio provider.  I tested this on the main trunk by running
ibv_rc_pingpong and rping over mthca.

Signed-off-by: Steve Wise <[EMAIL PROTECTED]>


Index: verbs.c
===================================================================
--- verbs.c     (revision 5839)
+++ verbs.c     (working copy)
@@ -78,6 +78,9 @@
 {
        struct ib_ah *ah;
 
+       if (!pd->device->create_ah)
+               return ERR_PTR(-ENOSYS);
+
        ah = pd->device->create_ah(pd, ah_attr);
 
        if (!IS_ERR(ah)) {
@@ -99,6 +102,9 @@
        u16 gid_index;
        int ret;
 
+       if (!pd->device->create_ah)
+               return ERR_PTR(-ENOSYS);
+
        memset(&ah_attr, 0, sizeof ah_attr);
        ah_attr.dlid = wc->slid;
        ah_attr.sl = wc->sl;
Index: device.c
===================================================================
--- device.c    (revision 5839)
+++ device.c    (working copy)
@@ -86,8 +86,6 @@
                IB_MANDATORY_FUNC(query_gid),
                IB_MANDATORY_FUNC(alloc_pd),
                IB_MANDATORY_FUNC(dealloc_pd),
-               IB_MANDATORY_FUNC(create_ah),
-               IB_MANDATORY_FUNC(destroy_ah),
                IB_MANDATORY_FUNC(create_qp),
                IB_MANDATORY_FUNC(modify_qp),
                IB_MANDATORY_FUNC(destroy_qp),
@@ -594,6 +592,8 @@
                        return -EINVAL;
        } else if (port_num < 1 || port_num > device->phys_port_cnt)
                return -EINVAL;
+       if (!device->modify_port)
+               return -ENOSYS;
 
        return device->modify_port(device, port_num, port_modify_mask,
                                   port_modify);

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to