]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[MTHCA] bugfix: return rkey in network order for map_phys_fmr verb
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 31 Aug 2006 08:08:52 +0000 (08:08 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 31 Aug 2006 08:08:52 +0000 (08:08 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@473 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/kernel/al_mr.c

index 8b85a0262cee4e15ae1cf8ded1f049642cd21358..a0b73195e58313a6756ad5f5ee0197a42396c2a4 100644 (file)
@@ -206,6 +206,7 @@ mlnx_create_fmr(
        }\r
 \r
        *ph_fmr = h_fmr;\r
+       /* Release the reference taken in alloc_mlnx_fmr for initialization. */\r
        deref_al_obj( &(*ph_fmr )->obj );\r
 \r
        AL_EXIT( AL_DBG_MR );\r
@@ -245,7 +246,7 @@ mlnx_map_phys_fmr(
        if( status != IB_SUCCESS )\r
        {\r
                //TODO: do we need to do something more about the error ?\r
-               AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
+               AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
                        ("unable to map FMR: %s\n", ib_get_err_str(status)) );\r
        }\r
 \r
@@ -307,11 +308,14 @@ mlnx_destroy_fmr(
        if( status == IB_SUCCESS )\r
        {\r
                h_fmr->h_ci_fmr = NULL;\r
-               /* We're good to destroy the object. */\r
+               /* We're good to destroy the object. \r
+               NOTE: No need to deref the al object , \r
+               we are reseting the fmr objb before inserting it back to the pool */\r
+               \r
                h_fmr->obj.pfn_destroy( &h_fmr->obj, NULL );\r
+       }else{\r
+               deref_al_obj( &h_fmr->obj );\r
        }\r
-       deref_al_obj( &h_fmr->obj );\r
-\r
        AL_EXIT( AL_DBG_MR );\r
        return status;\r
 }\r