[IPOIB] Prevent a BSOD which happens when restarting the opensm more than once (if...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 13 Aug 2009 17:34:29 +0000 (17:34 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 13 Aug 2009 17:34:29 +0000 (17:34 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2351 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_port.c

index da36393..59ab6ce 100644 (file)
@@ -4598,8 +4598,11 @@ __endpt_mgr_reset_all(
                        &p_port->p_local_endpt->gid_item );\r
                cl_qmap_remove_item( &p_port->endpt_mgr.mac_endpts,\r
                        &p_port->p_local_endpt->mac_item );\r
-               cl_qmap_remove_item( &p_port->endpt_mgr.lid_endpts,\r
-                       &p_port->p_local_endpt->lid_item );\r
+               if( p_port->p_local_endpt->dlid ) {\r
+                       cl_qmap_remove_item( &p_port->endpt_mgr.lid_endpts,\r
+                               &p_port->p_local_endpt->lid_item );\r
+                       p_port->p_local_endpt->dlid = 0;\r
+               }\r
                \r
                cl_qlist_insert_head(\r
                        &mc_list, &p_port->p_local_endpt->mac_item.pool_item.list_item );\r
@@ -5155,6 +5158,7 @@ ipoib_port_remove_endpt(
                {\r
                        cl_qmap_remove_item(\r
                                &p_port->endpt_mgr.lid_endpts, &p_endpt->lid_item );\r
+                       p_endpt->dlid = 0;\r
                }\r
 \r
                cl_obj_unlock( &p_port->obj );\r