[MTHCA] fixed a typo, producing a crash, and changed debug flags
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Apr 2006 09:03:24 +0000 (09:03 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Apr 2006 09:03:24 +0000 (09:03 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@297 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/kernel/hca_verbs.c

index 49b87a2..30e096c 100644 (file)
@@ -561,7 +561,7 @@ mlnx_create_av (
        struct ib_ah_attr ah_attr;\r
        struct ib_ucontext *p_context = NULL;\r
 \r
-       HCA_ENTER(HCA_DBG_QP);\r
+       HCA_ENTER(HCA_DBG_AV);\r
 \r
        if( p_umv_buf && p_umv_buf->command ) {\r
                // sanity checks \r
@@ -581,10 +581,10 @@ mlnx_create_av (
        mlnx_conv_ibal_av( ib_dev, p_addr_vector,  &ah_attr );\r
 \r
        ib_av_p = ibv_create_ah(ib_pd_p, &ah_attr, p_context, p_umv_buf);\r
-       if (IS_ERR(ib_pd_p)) {\r
-               err = PTR_ERR(ib_pd_p);\r
-               HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_QP,\r
-                       ("ibv_alloc_pd failed (%d)\n", err));\r
+       if (IS_ERR(ib_av_p)) {\r
+               err = PTR_ERR(ib_av_p);\r
+               HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_AV,\r
+                       ("ibv_create_ah failed (%d)\n", err));\r
                status = errno_to_iberr(err);\r
                goto err_alloc_av;\r
        }\r
@@ -603,7 +603,7 @@ mlnx_create_av (
        \r
 err_alloc_av:  \r
 err_inval_params:\r
-       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR ,HCA_DBG_QP,\r
+       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR ,HCA_DBG_AV,\r
                ("completes with ERROR status %s\n", IB_GET_ERR_STR(status)));\r
        return status;\r
 }\r
@@ -620,11 +620,11 @@ mlnx_query_av (
        struct ib_ah *ib_ah_p = (struct ib_ah *)h_av;\r
        PREP_IBDEV_FOR_PRINT(ib_ah_p->device)\r
 \r
-       HCA_ENTER(HCA_DBG_SHIM);\r
+       HCA_ENTER(HCA_DBG_AV);\r
 \r
        // sanity checks\r
        if( p_umv_buf && p_umv_buf->command ) {\r
-                       HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_SHIM,\r
+                       HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_AV,\r
                                ("User mode is not supported yet\n"));\r
                        status = IB_UNSUPPORTED;\r
                        goto err_user_unsupported;\r
@@ -635,7 +635,7 @@ mlnx_query_av (
        //TODO: not implemented in low-level driver\r
        err = ibv_query_ah(ib_ah_p, &ah_attr)\r
        if (err) {\r
-               HCA_PRINT(TRACE_LEVEL_ERROR, HCA_DBG_SHIM,\r
+               HCA_PRINT(TRACE_LEVEL_ERROR, HCA_DBG_AV,\r
                        ("ibv_query_ah failed (%d)\n", err));\r
                status = errno_to_iberr(err);\r
                goto err_query_ah;\r
@@ -646,7 +646,7 @@ mlnx_query_av (
 \r
        err = mlnx_conv_mthca_av( ib_ah_p, p_addr_vector );\r
        if (err) {\r
-               HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_SHIM,\r
+               HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_AV,\r
                        ("mlnx_conv_mthca_av failed (%d)\n", err));\r
                status = errno_to_iberr(err);\r
                goto err_conv_mthca_av;\r
@@ -658,7 +658,7 @@ mlnx_query_av (
        \r
 err_conv_mthca_av:\r
 err_user_unsupported:\r
-       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_SHIM,\r
+       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_AV,\r
                ("completes with ERROR status %s\n", IB_GET_ERR_STR(status)));\r
        return status;\r
 }\r
@@ -674,11 +674,11 @@ mlnx_modify_av (
        struct ib_ah *ib_ah_p = (struct ib_ah *)h_av;\r
        struct ib_device *ib_dev = ib_ah_p->pd->device;\r
 \r
-       HCA_ENTER(HCA_DBG_SHIM);\r
+       HCA_ENTER(HCA_DBG_AV);\r
 \r
        // sanity checks\r
        if( p_umv_buf && p_umv_buf->command ) {\r
-                       HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_SHIM,\r
+                       HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_AV,\r
                                ("User mode is not supported yet\n"));\r
                        status = IB_UNSUPPORTED;\r
                        goto err_user_unsupported;\r
@@ -693,7 +693,7 @@ mlnx_modify_av (
        //TODO: not implemented in low-level driver\r
        err = ibv_modify_ah(ib_ah_p, &ah_attr)\r
        if (err) {\r
-               HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_SHIM,\r
+               HCA_PRINT (TRACE_LEVEL_ERROR, HCA_DBG_AV,\r
                        ("ibv_query_ah failed (%d)\n", err));\r
                status = errno_to_iberr(err);\r
                goto err_query_ah;\r
@@ -704,7 +704,7 @@ mlnx_modify_av (
 #endif\r
 \r
 err_user_unsupported:\r
-       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_SHIM,\r
+       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_AV,\r
                ("completes with ERROR status %s\n", IB_GET_ERR_STR(status)));\r
        return status;\r
 }\r
@@ -718,19 +718,19 @@ mlnx_destroy_av (
        struct ib_ah *ib_ah_p = (struct ib_ah *)h_av;\r
        PREP_IBDEV_FOR_PRINT(ib_ah_p->device)\r
 \r
-       HCA_ENTER(HCA_DBG_SHIM);\r
+       HCA_ENTER(HCA_DBG_AV);\r
 \r
        // destroy AV\r
        err = ibv_destroy_ah( ib_ah_p );\r
        if (err) {\r
-               HCA_PRINT (TRACE_LEVEL_ERROR ,HCA_DBG_SHIM,\r
+               HCA_PRINT (TRACE_LEVEL_ERROR ,HCA_DBG_AV,\r
                        ("ibv_destroy_ah failed (%d)\n", err));\r
                status = errno_to_iberr(err);\r
                goto err_destroy_ah;\r
        }\r
 \r
 err_destroy_ah:\r
-       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_SHIM,\r
+       HCA_PRINT_EXIT(TRACE_LEVEL_ERROR  , HCA_DBG_AV,\r
                ("completes with ERROR status %s\n", IB_GET_ERR_STR(status)));\r
        return status;\r
 }\r