[MTHCA] 1. bugfix: skip any action in post-verb processing in user space, when kernel...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 9 Jul 2006 18:15:55 +0000 (18:15 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 9 Jul 2006 18:15:55 +0000 (18:15 +0000)
2. cleaning: blanks replaced by tabs

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@412 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/user/mlnx_ual_av.c
hw/mthca/user/mlnx_ual_ca.c
hw/mthca/user/mlnx_ual_cq.c
hw/mthca/user/mlnx_ual_mcast.c
hw/mthca/user/mlnx_ual_pd.c

index 393c7bc..885d777 100644 (file)
 \r
 void\r
 mlnx_get_av_interface (\r
-    IN OUT     uvp_interface_t         *p_uvp )\r
+       IN OUT  uvp_interface_t         *p_uvp )\r
 {\r
 \r
-    CL_ASSERT(p_uvp);\r
+       CL_ASSERT(p_uvp);\r
 \r
-    /*\r
-     * Address Vector Management Verbs\r
-     */\r
-    p_uvp->pre_create_av  = mlnx_pre_create_av;\r
-    p_uvp->post_create_av = mlnx_post_create_av;\r
-    p_uvp->pre_query_av   = mlnx_pre_query_av;\r
-    p_uvp->post_query_av  = mlnx_post_query_av;\r
-    p_uvp->pre_modify_av   = mlnx_pre_modify_av;\r
-    p_uvp->post_modify_av  = mlnx_post_modify_av;\r
-    p_uvp->pre_destroy_av  = mlnx_pre_destroy_av;\r
-    p_uvp->post_destroy_av = mlnx_post_destroy_av;\r
+       /*\r
+        * Address Vector Management Verbs\r
+        */\r
+       p_uvp->pre_create_av  = mlnx_pre_create_av;\r
+       p_uvp->post_create_av = mlnx_post_create_av;\r
+       p_uvp->pre_query_av   = mlnx_pre_query_av;\r
+       p_uvp->post_query_av  = mlnx_post_query_av;\r
+       p_uvp->pre_modify_av   = mlnx_pre_modify_av;\r
+       p_uvp->post_modify_av  = mlnx_post_modify_av;\r
+       p_uvp->pre_destroy_av  = mlnx_pre_destroy_av;\r
+       p_uvp->post_destroy_av = mlnx_post_destroy_av;\r
 \r
 }\r
 \r
 \r
 uint8_t\r
 gid_to_index_lookup (\r
-    IN         ib_ca_attr_t    *p_ca_attr,\r
-    IN         uint8_t         port_num,\r
-    IN         uint8_t         *raw_gid)\r
+       IN              ib_ca_attr_t    *p_ca_attr,\r
+       IN              uint8_t         port_num,\r
+       IN              uint8_t         *raw_gid)\r
 {\r
-    ib_gid_t *p_gid_table = NULL;\r
-    uint8_t i, index = 0;\r
-    uint16_t num_gids;\r
-\r
-    p_gid_table = p_ca_attr->p_port_attr[port_num-1].p_gid_table;\r
-    CL_ASSERT (p_gid_table);\r
-\r
-    num_gids = p_ca_attr->p_port_attr[port_num-1].num_gids;\r
-    UVP_PRINT(TRACE_LEVEL_INFORMATION, UVP_DBG_AV, \r
-              ("Port %d has %d gids\n", port_num, num_gids));\r
-\r
-    for (i = 0; i < num_gids; i++)\r
-    {\r
-        if (cl_memcmp (raw_gid, p_gid_table[i].raw, sizeof (ib_gid_t)))\r
-        {\r
-            UVP_PRINT(TRACE_LEVEL_INFORMATION ,UVP_DBG_AV ,\r
-                      ("found GID at index %d\n", i));\r
-            index = i;\r
-            break;\r
-        }\r
-    }\r
-    return index;\r
+       ib_gid_t *p_gid_table = NULL;\r
+       uint8_t i, index = 0;\r
+       uint16_t num_gids;\r
+\r
+       p_gid_table = p_ca_attr->p_port_attr[port_num-1].p_gid_table;\r
+       CL_ASSERT (p_gid_table);\r
+\r
+       num_gids = p_ca_attr->p_port_attr[port_num-1].num_gids;\r
+       UVP_PRINT(TRACE_LEVEL_INFORMATION, UVP_DBG_AV, \r
+               ("Port %d has %d gids\n", port_num, num_gids));\r
+\r
+       for (i = 0; i < num_gids; i++)\r
+       {\r
+               if (cl_memcmp (raw_gid, p_gid_table[i].raw, sizeof (ib_gid_t)))\r
+               {\r
+                       UVP_PRINT(TRACE_LEVEL_INFORMATION ,UVP_DBG_AV ,\r
+                               ("found GID at index %d\n", i));\r
+                       index = i;\r
+                       break;\r
+               }\r
+       }\r
+       return index;\r
 }\r
 \r
 ib_api_status_t\r
 map_itom_av_attr (\r
-    IN         ib_ca_attr_t            *p_ca_attr,\r
-    IN         const ib_av_attr_t      *p_av_attr,\r
-    OUT                struct ibv_ah_attr              *p_attr)\r
+       IN              ib_ca_attr_t            *p_ca_attr,\r
+       IN              const ib_av_attr_t      *p_av_attr,\r
+       OUT             struct ibv_ah_attr              *p_attr)\r
 {\r
 \r
 \r
@@ -135,9 +135,9 @@ map_itom_av_attr (
 \r
 ib_api_status_t\r
 mlnx_pre_create_av (\r
-    IN         const ib_pd_handle_t            h_uvp_pd,\r
-    IN         const ib_av_attr_t              *p_av_attr,\r
-    IN OUT     ci_umv_buf_t                    *p_umv_buf)\r
+       IN              const ib_pd_handle_t            h_uvp_pd,\r
+       IN              const ib_av_attr_t              *p_av_attr,\r
+       IN OUT  ci_umv_buf_t                    *p_umv_buf)\r
 {\r
        int err;\r
        struct mthca_ah *ah;\r
@@ -228,10 +228,10 @@ end:
 \r
 void\r
 mlnx_post_create_av (\r
-    IN         const ib_pd_handle_t            h_uvp_pd,\r
-    IN         ib_api_status_t                 ioctl_status,\r
-    OUT                ib_av_handle_t                  *ph_uvp_av,\r
-    IN OUT     ci_umv_buf_t                    *p_umv_buf)\r
+       IN              const ib_pd_handle_t            h_uvp_pd,\r
+       IN              ib_api_status_t                 ioctl_status,\r
+       OUT             ib_av_handle_t                  *ph_uvp_av,\r
+       IN OUT  ci_umv_buf_t                    *p_umv_buf)\r
 {\r
        int err;\r
        struct mthca_ah *ah;\r
@@ -278,9 +278,9 @@ mlnx_pre_query_av (
 {\r
        UNREFERENCED_PARAMETER(h_uvp_av);\r
        UNREFERENCED_PARAMETER(p_umv_buf);\r
-    UVP_ENTER(UVP_DBG_AV);\r
-    UVP_EXIT(UVP_DBG_AV);\r
-    return IB_VERBS_PROCESSING_DONE;\r
+       UVP_ENTER(UVP_DBG_AV);\r
+       UVP_EXIT(UVP_DBG_AV);\r
+       return IB_VERBS_PROCESSING_DONE;\r
 }\r
 \r
 \r
@@ -295,27 +295,27 @@ mlnx_post_query_av (
        struct mthca_ah *ah = (struct mthca_ah *)h_uvp_av;\r
        UNREFERENCED_PARAMETER(p_umv_buf);\r
 \r
-    UVP_ENTER(UVP_DBG_AV);\r
-    CL_ASSERT(p_umv_buf);\r
-    CL_ASSERT(p_addr_vector);\r
+       UVP_ENTER(UVP_DBG_AV);\r
+       CL_ASSERT(p_umv_buf);\r
+       CL_ASSERT(p_addr_vector);\r
 \r
-    if (ioctl_status == IB_SUCCESS)\r
-    {\r
-        cl_memcpy (p_addr_vector, &ah->av_attr, sizeof (ib_av_attr_t));\r
+       if (ioctl_status == IB_SUCCESS)\r
+       {\r
+               cl_memcpy (p_addr_vector, &ah->av_attr, sizeof (ib_av_attr_t));\r
                if (ph_pd)\r
                        *ph_pd = (ib_pd_handle_t)ah->h_uvp_pd;\r
-    }\r
-    \r
-    UVP_EXIT(UVP_DBG_AV);\r
+       }\r
+       \r
+       UVP_EXIT(UVP_DBG_AV);\r
 }\r
 \r
 void mthca_set_av_params( struct mthca_ah *ah_p, struct ibv_ah_attr *ah_attr );\r
 \r
 ib_api_status_t\r
 mlnx_pre_modify_av (\r
-    IN         const ib_av_handle_t            h_uvp_av,\r
-    IN         const ib_av_attr_t              *p_addr_vector,\r
-    IN OUT     ci_umv_buf_t                    *p_umv_buf)\r
+       IN              const ib_av_handle_t            h_uvp_av,\r
+       IN              const ib_av_attr_t              *p_addr_vector,\r
+       IN OUT  ci_umv_buf_t                    *p_umv_buf)\r
 {\r
        ib_api_status_t status ;\r
        struct mthca_ah *mthca_ah = (struct mthca_ah *)h_uvp_av;\r
@@ -348,19 +348,18 @@ mlnx_pre_modify_av (
 \r
 void\r
 mlnx_post_modify_av (\r
-    IN         const ib_av_handle_t    h_uvp_av,\r
-    IN         ib_api_status_t         ioctl_status,\r
-    IN OUT     ci_umv_buf_t            *p_umv_buf)\r
+       IN              const ib_av_handle_t    h_uvp_av,\r
+       IN              ib_api_status_t         ioctl_status,\r
+       IN OUT  ci_umv_buf_t            *p_umv_buf)\r
 {\r
-    UVP_ENTER(UVP_DBG_AV);\r
-    UVP_EXIT(UVP_DBG_AV);\r
-    return;\r
+       UVP_ENTER(UVP_DBG_AV);\r
+       UVP_EXIT(UVP_DBG_AV);\r
 }\r
 \r
 \r
 ib_api_status_t\r
 mlnx_pre_destroy_av (\r
-    IN         const ib_av_handle_t            h_uvp_av)\r
+       IN              const ib_av_handle_t            h_uvp_av)\r
 {\r
        ib_api_status_t status ;\r
        struct mthca_ah *mthca_ah = (struct mthca_ah *)h_uvp_av;\r
@@ -375,16 +374,19 @@ mlnx_pre_destroy_av (
 \r
 void\r
 mlnx_post_destroy_av (\r
-    IN         const ib_av_handle_t            h_uvp_av,\r
-    IN         ib_api_status_t                 ioctl_status)\r
+       IN              const ib_av_handle_t            h_uvp_av,\r
+       IN              ib_api_status_t                 ioctl_status)\r
 {\r
        struct mthca_ah *mthca_ah = (struct mthca_ah *)h_uvp_av;\r
-       UNREFERENCED_PARAMETER(ioctl_status);\r
 \r
        UVP_ENTER(UVP_DBG_AV);\r
        CL_ASSERT (h_uvp_av);\r
-       mthca_free_av(mthca_ah);\r
-       cl_free(mthca_ah);\r
+\r
+       if (IB_SUCCESS == ioctl_status) {\r
+               mthca_free_av(mthca_ah);\r
+               cl_free(mthca_ah);\r
+       }\r
+\r
        UVP_EXIT(UVP_DBG_AV);\r
        return;\r
 }\r
index 83dd92c..231cd02 100644 (file)
@@ -44,25 +44,25 @@ extern uint32_t     mlnx_dbg_lvl;
 \r
 void\r
 mlnx_get_ca_interface (\r
-    IN OUT     uvp_interface_t         *p_uvp )\r
+       IN OUT  uvp_interface_t         *p_uvp )\r
 {\r
-    CL_ASSERT(p_uvp);\r
+       CL_ASSERT(p_uvp);\r
+\r
+       /*\r
+        * HCA Access Verbs\r
+        */\r
+       p_uvp->pre_open_ca  = mlnx_pre_open_ca;\r
+       p_uvp->post_open_ca = mlnx_post_open_ca;\r
 \r
-    /*\r
-     * HCA Access Verbs\r
-     */\r
-    p_uvp->pre_open_ca  = mlnx_pre_open_ca;\r
-    p_uvp->post_open_ca = mlnx_post_open_ca;\r
 \r
-  \r
-    p_uvp->pre_query_ca  = mlnx_pre_query_ca;\r
-    p_uvp->post_query_ca = mlnx_post_query_ca;\r
+       p_uvp->pre_query_ca  = mlnx_pre_query_ca;\r
+       p_uvp->post_query_ca = mlnx_post_query_ca;\r
 \r
-    p_uvp->pre_modify_ca  = NULL;\r
-    p_uvp->post_modify_ca = NULL;\r
+       p_uvp->pre_modify_ca  = NULL;\r
+       p_uvp->post_modify_ca = NULL;\r
 \r
-    p_uvp->pre_close_ca  = mlnx_pre_close_ca;\r
-    p_uvp->post_close_ca = mlnx_post_close_ca;\r
+       p_uvp->pre_close_ca  = mlnx_pre_close_ca;\r
+       p_uvp->post_close_ca = mlnx_post_close_ca;\r
 \r
 }\r
 \r
@@ -235,47 +235,50 @@ mlnx_pre_modify_ca (
 \r
 void\r
 mlnx_post_modify_ca (\r
-    IN         ib_ca_handle_t                  h_uvp_ca,\r
-    IN         ib_api_status_t                 ioctl_status)\r
+       IN              ib_ca_handle_t                  h_uvp_ca,\r
+       IN              ib_api_status_t                 ioctl_status)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r
 \r
 \r
 ib_api_status_t\r
 mlnx_pre_close_ca (\r
-    IN         ib_ca_handle_t          h_uvp_ca)\r
+       IN              ib_ca_handle_t          h_uvp_ca)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return IB_SUCCESS;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
+       return IB_SUCCESS;\r
 }\r
 \r
 \r
 ib_api_status_t\r
 mlnx_post_close_ca (\r
-    IN         ib_ca_handle_t          h_uvp_ca,\r
-    IN         ib_api_status_t         ioctl_status )\r
+       IN              ib_ca_handle_t          h_uvp_ca,\r
+       IN              ib_api_status_t         ioctl_status )\r
 {\r
-    mlnx_ual_hobul_t *p_hobul = (mlnx_ual_hobul_t *)((void*)h_uvp_ca);\r
+       mlnx_ual_hobul_t *p_hobul = (mlnx_ual_hobul_t *)((void*)h_uvp_ca);\r
 \r
-    UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
 \r
-    CL_ASSERT(p_hobul);\r
+       CL_ASSERT(p_hobul);\r
 \r
-       if (p_hobul->ibv_ctx) {\r
-               mthca_free_context(p_hobul->ibv_ctx);\r
-               p_hobul->ibv_ctx = NULL;\r
+       if (IB_SUCCESS == ioctl_status) {\r
+               if (p_hobul->ibv_ctx) {\r
+                       mthca_free_context(p_hobul->ibv_ctx);\r
+                       p_hobul->ibv_ctx = NULL;\r
+               }\r
+\r
+               if (p_hobul->p_hca_attr) {\r
+                       cl_free( p_hobul->p_hca_attr);\r
+                       p_hobul->p_hca_attr = NULL;\r
+               }\r
+\r
+               cl_free(p_hobul);\r
        }\r
-    if (p_hobul->p_hca_attr) {\r
-               cl_free( p_hobul->p_hca_attr);\r
-               p_hobul->p_hca_attr = NULL;\r
-    }\r
-    cl_free(p_hobul);\r
-    \r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return IB_SUCCESS;\r
+       \r
+       UVP_EXIT(UVP_DBG_SHIM);\r
+       return IB_SUCCESS;\r
 }\r
 \r
index dfcb12f..bb06f17 100644 (file)
@@ -44,28 +44,28 @@ extern uint32_t     mlnx_dbg_lvl;
 \r
 void\r
 mlnx_get_cq_interface (\r
-    IN OUT     uvp_interface_t         *p_uvp )\r
+       IN OUT  uvp_interface_t         *p_uvp )\r
 {\r
-    UVP_ENTER(UVP_DBG_DEV);\r
+       UVP_ENTER(UVP_DBG_DEV);\r
 \r
-    CL_ASSERT(p_uvp);\r
+       CL_ASSERT(p_uvp);\r
 \r
-    /*\r
-     * Completion Queue Management Verbs\r
-     */\r
-    p_uvp->pre_create_cq  = mlnx_pre_create_cq;\r
-    p_uvp->post_create_cq = mlnx_post_create_cq;\r
-  \r
-    p_uvp->pre_query_cq  = mlnx_pre_query_cq;\r
-    p_uvp->post_query_cq = NULL;\r
+       /*\r
+        * Completion Queue Management Verbs\r
+        */\r
+       p_uvp->pre_create_cq  = mlnx_pre_create_cq;\r
+       p_uvp->post_create_cq = mlnx_post_create_cq;\r
 \r
-    p_uvp->pre_resize_cq  = NULL; /* mlnx_pre_resize_cq: not supported in kernel */\r
-    p_uvp->post_resize_cq = NULL;      /* mlnx_post_resize_cq:not supported in kernel */ \r
+       p_uvp->pre_query_cq  = mlnx_pre_query_cq;\r
+       p_uvp->post_query_cq = NULL;\r
 \r
-    p_uvp->pre_destroy_cq  = mlnx_pre_destroy_cq;\r
-    p_uvp->post_destroy_cq = mlnx_post_destroy_cq;\r
+       p_uvp->pre_resize_cq  = NULL; /* mlnx_pre_resize_cq: not supported in kernel */\r
+       p_uvp->post_resize_cq = NULL;   /* mlnx_post_resize_cq:not supported in kernel */ \r
 \r
-    UVP_EXIT(UVP_DBG_DEV);\r
+       p_uvp->pre_destroy_cq  = mlnx_pre_destroy_cq;\r
+       p_uvp->post_destroy_cq = mlnx_post_destroy_cq;\r
+\r
+       UVP_EXIT(UVP_DBG_DEV);\r
 }\r
 \r
 ib_api_status_t\r
@@ -196,32 +196,33 @@ mlnx_pre_query_cq (
 \r
 ib_api_status_t\r
 mlnx_pre_destroy_cq (\r
-    IN         const ib_cq_handle_t                    h_uvp_cq)\r
+       IN              const ib_cq_handle_t                    h_uvp_cq)\r
 {\r
-    UVP_ENTER(UVP_DBG_CQ);\r
-    UVP_EXIT(UVP_DBG_CQ);\r
-    return IB_SUCCESS;\r
+       UVP_ENTER(UVP_DBG_CQ);\r
+       UVP_EXIT(UVP_DBG_CQ);\r
+       return IB_SUCCESS;\r
 }\r
 \r
 void\r
 mlnx_post_destroy_cq (\r
-    IN         const ib_cq_handle_t            h_uvp_cq,\r
-    IN         ib_api_status_t                 ioctl_status)\r
+       IN              const ib_cq_handle_t            h_uvp_cq,\r
+       IN              ib_api_status_t                 ioctl_status)\r
 {\r
        int err;\r
        mlnx_ual_cq_info_t *p_cq_info = (mlnx_ual_cq_info_t *) ((void*)h_uvp_cq);\r
-    UNREFERENCED_PARAMETER(ioctl_status);\r
+       UNREFERENCED_PARAMETER(ioctl_status);\r
 \r
-    UVP_ENTER(UVP_DBG_CQ);\r
+       UVP_ENTER(UVP_DBG_CQ);\r
 \r
-    CL_ASSERT(p_cq_info || p_cq_info->ibv_cq);\r
+       CL_ASSERT(p_cq_info || p_cq_info->ibv_cq);\r
 \r
-       err = p_cq_info->p_hobul->ibv_ctx->ops.destroy_cq( p_cq_info->ibv_cq );\r
-       if (err) \r
-               UVP_PRINT(TRACE_LEVEL_ERROR ,UVP_DBG_CQ, ("mthca_destroy_cq failed (%d)\n", err));\r
+       if (IB_SUCCESS == ioctl_status) {\r
+               err = p_cq_info->p_hobul->ibv_ctx->ops.destroy_cq( p_cq_info->ibv_cq );\r
+               if (err) \r
+                       UVP_PRINT(TRACE_LEVEL_ERROR ,UVP_DBG_CQ, ("mthca_destroy_cq failed (%d)\n", err));\r
+               cl_free (p_cq_info);\r
+       }\r
 \r
-    cl_free (p_cq_info);\r
-    UVP_EXIT(UVP_DBG_CQ);\r
-    return;\r
+       UVP_EXIT(UVP_DBG_CQ);\r
 }\r
 \r
index 423d4a3..3c2a953 100644 (file)
 \r
 void\r
 mlnx_get_mcast_interface (\r
-    IN OUT     uvp_interface_t         *p_uvp )\r
+       IN OUT  uvp_interface_t         *p_uvp )\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
 \r
-    CL_ASSERT(p_uvp);\r
+       CL_ASSERT(p_uvp);\r
 \r
-    /*\r
-     * Multicast Support Verbs\r
-     */\r
-    p_uvp->pre_attach_mcast  = NULL;\r
-    p_uvp->post_attach_mcast = NULL;\r
-    p_uvp->pre_detach_mcast  = NULL;\r
-    p_uvp->post_detach_mcast = NULL;\r
+       /*\r
+        * Multicast Support Verbs\r
+        */\r
+       p_uvp->pre_attach_mcast  = NULL;\r
+       p_uvp->post_attach_mcast = NULL;\r
+       p_uvp->pre_detach_mcast  = NULL;\r
+       p_uvp->post_detach_mcast = NULL;\r
 \r
-    UVP_EXIT(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r
 \r
 \r
 \r
 ib_api_status_t\r
 mlnx_pre_attach_mcast (\r
-    IN const   ib_qp_handle_t          h_uvp_qp,\r
-    IN const   ib_gid_t                        *p_mcast_gid,\r
-    IN const   uint16_t                        mcast_lid,\r
-    IN OUT             ci_umv_buf_t            *p_umv_buf)\r
+       IN      const   ib_qp_handle_t          h_uvp_qp,\r
+       IN      const   ib_gid_t                        *p_mcast_gid,\r
+       IN      const   uint16_t                        mcast_lid,\r
+       IN OUT          ci_umv_buf_t            *p_umv_buf)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-#if 1\r
-    CL_ASSERT(p_umv_buf);\r
-    p_umv_buf->p_inout_buf = NULL;;\r
-    p_umv_buf->input_size = 0;\r
-    p_umv_buf->output_size = 0;\r
-    p_umv_buf->command = TRUE;\r
-#endif\r
-\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return IB_SUCCESS;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       CL_ASSERT(p_umv_buf);\r
+       p_umv_buf->p_inout_buf = NULL;;\r
+       p_umv_buf->input_size = 0;\r
+       p_umv_buf->output_size = 0;\r
+       p_umv_buf->command = TRUE;\r
+\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
+       return IB_SUCCESS;\r
 }\r
 \r
 \r
 \r
 void\r
 mlnx_post_attach_mcast (\r
-    IN         const ib_qp_handle_t    h_uvp_qp,\r
-    IN         ib_api_status_t                 ioctl_status,\r
-    OUT                ib_mcast_handle_t               *ph_mcast,\r
-    IN OUT     ci_umv_buf_t                    *p_umv_buf)\r
+       IN              const ib_qp_handle_t    h_uvp_qp,\r
+       IN              ib_api_status_t                 ioctl_status,\r
+       OUT             ib_mcast_handle_t               *ph_mcast,\r
+       IN OUT  ci_umv_buf_t                    *p_umv_buf)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r
 \r
 \r
 \r
 ib_api_status_t\r
 mlnx_pre_detach_mcast (\r
-    IN         ib_mcast_handle_t       h_uvp_mcast,\r
-    IN OUT     ci_umv_buf_t            *p_umv_buf)\r
+       IN              ib_mcast_handle_t       h_uvp_mcast,\r
+       IN OUT  ci_umv_buf_t            *p_umv_buf)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-#if 1\r
-    CL_ASSERT(p_umv_buf);\r
-    p_umv_buf->p_inout_buf = NULL;;\r
-    p_umv_buf->input_size = 0;\r
-    p_umv_buf->output_size = 0;\r
-#endif\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+\r
+       CL_ASSERT(p_umv_buf);\r
+       p_umv_buf->p_inout_buf = NULL;;\r
+       p_umv_buf->input_size = 0;\r
+       p_umv_buf->output_size = 0;\r
 \r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return IB_SUCCESS;\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
+       return IB_SUCCESS;\r
 }\r
 \r
 \r
 void\r
 mlnx_post_detach_mcast (\r
-    IN         ib_mcast_handle_t       h_uvp_mcast,\r
-    IN         ib_api_status_t         ioctl_status,\r
-    IN OUT     ci_umv_buf_t            *p_umv_buf)\r
+       IN              ib_mcast_handle_t       h_uvp_mcast,\r
+       IN              ib_api_status_t         ioctl_status,\r
+       IN OUT  ci_umv_buf_t            *p_umv_buf)\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r
index 01cad30..225fd33 100644 (file)
 \r
 void\r
 mlnx_get_pd_interface (\r
-    IN OUT     uvp_interface_t         *p_uvp )\r
+       IN OUT  uvp_interface_t         *p_uvp )\r
 {\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
 \r
-    CL_ASSERT(p_uvp);\r
+       CL_ASSERT(p_uvp);\r
 \r
-    /*\r
-     * Protection Domain\r
-     */\r
-    p_uvp->pre_allocate_pd    = mlnx_pre_allocate_pd;\r
-    p_uvp->post_allocate_pd   = mlnx_post_allocate_pd;\r
-    p_uvp->pre_deallocate_pd  = mlnx_pre_deallocate_pd;\r
-    p_uvp->post_deallocate_pd = mlnx_post_deallocate_pd;\r
+       /*\r
+        * Protection Domain\r
+        */\r
+       p_uvp->pre_allocate_pd    = mlnx_pre_allocate_pd;\r
+       p_uvp->post_allocate_pd   = mlnx_post_allocate_pd;\r
+       p_uvp->pre_deallocate_pd  = mlnx_pre_deallocate_pd;\r
+       p_uvp->post_deallocate_pd = mlnx_post_deallocate_pd;\r
 \r
-    UVP_EXIT(UVP_DBG_SHIM);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r
 \r
 ib_api_status_t\r
 mlnx_pre_allocate_pd (\r
-    IN         const ib_ca_handle_t            h_uvp_ca,\r
-    IN OUT     ci_umv_buf_t                    *p_umv_buf)\r
+       IN              const ib_ca_handle_t            h_uvp_ca,\r
+       IN OUT  ci_umv_buf_t                    *p_umv_buf)\r
 {\r
        ib_api_status_t status = IB_SUCCESS;\r
 \r
@@ -146,34 +146,34 @@ end:
 \r
 ib_api_status_t\r
 mlnx_pre_deallocate_pd (\r
-    IN         const ib_pd_handle_t            h_uvp_pd)\r
+       IN              const ib_pd_handle_t            h_uvp_pd)\r
 {\r
        mlnx_ual_pd_info_t *p_pd_info = (mlnx_ual_pd_info_t *)((void *)h_uvp_pd);\r
-    UVP_ENTER(UVP_DBG_SHIM);\r
-    CL_ASSERT(p_pd_info);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return IB_SUCCESS;\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
+       CL_ASSERT(p_pd_info);\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
+       return IB_SUCCESS;\r
 }\r
 \r
 \r
 void\r
 mlnx_post_deallocate_pd (\r
-    IN         const ib_pd_handle_t            h_uvp_pd,\r
-    IN         ib_api_status_t                 ioctl_status )\r
+       IN              const ib_pd_handle_t            h_uvp_pd,\r
+       IN              ib_api_status_t                 ioctl_status )\r
 {\r
        int err;\r
-    mlnx_ual_pd_info_t *p_pd_info = (mlnx_ual_pd_info_t *)((void *)h_uvp_pd);\r
-    UNREFERENCED_PARAMETER(ioctl_status);\r
+       mlnx_ual_pd_info_t *p_pd_info = (mlnx_ual_pd_info_t *)((void *)h_uvp_pd);\r
 \r
-    UVP_ENTER(UVP_DBG_SHIM);\r
+       UVP_ENTER(UVP_DBG_SHIM);\r
 \r
-    CL_ASSERT(p_pd_info || p_pd_info->ibv_pd);\r
+       CL_ASSERT(p_pd_info || p_pd_info->ibv_pd);\r
 \r
-       err = p_pd_info->p_hobul->ibv_ctx->ops.dealloc_pd( p_pd_info->ibv_pd );\r
-       if (err) \r
-               UVP_PRINT(TRACE_LEVEL_ERROR ,UVP_DBG_SHIM , ("mthca_alloc_pd failed (%d)\n", err));\r
+       if (IB_SUCCESS == ioctl_status) {\r
+               err = p_pd_info->p_hobul->ibv_ctx->ops.dealloc_pd( p_pd_info->ibv_pd );\r
+               if (err) \r
+                       UVP_PRINT(TRACE_LEVEL_ERROR ,UVP_DBG_SHIM , ("mthca_alloc_pd failed (%d)\n", err));\r
 \r
-    cl_free (p_pd_info);\r
-    UVP_EXIT(UVP_DBG_SHIM);\r
-    return;\r
+               cl_free (p_pd_info);\r
+       }\r
+       UVP_EXIT(UVP_DBG_SHIM);\r
 }\r