]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[ipoib] Make sure that the dlid is zero if it is not in the list.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Nov 2008 17:15:02 +0000 (17:15 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Nov 2008 17:15:02 +0000 (17:15 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1746 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_port.c

index fe95ab553431b789e1e296d208ef9a30025cb8ea..2d55dbfc6bed1d9c55e29662220811fc72bf59c4 100644 (file)
@@ -5037,6 +5037,10 @@ __endpt_mgr_insert(
                p_qitem = cl_qmap_insert(\r
                        &p_port->endpt_mgr.lid_endpts, p_endpt->dlid, &p_endpt->lid_item );\r
                CL_ASSERT( p_qitem == &p_endpt->lid_item );\r
+               if (p_qitem != &p_endpt->lid_item) {\r
+                       // Since we failed to insert into the list, make sure it is not removed\r
+                       p_endpt->dlid =0;\r
+               }\r
        }\r
 \r
        IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
@@ -6124,6 +6128,11 @@ __mcast_cb(
                p_qitem = cl_qmap_insert(\r
                        &p_port->endpt_mgr.lid_endpts, p_endpt->dlid, &p_endpt->lid_item );\r
                CL_ASSERT( p_qitem == &p_endpt->lid_item );\r
+               if (p_qitem != &p_endpt->lid_item) {\r
+                       // Since we failed to insert into the list, make sure it is not removed\r
+                       p_endpt->dlid =0;\r
+               }\r
+               \r
        }\r
        /* set flag that endpoint is use */\r
        p_endpt->is_in_use = TRUE;\r