[IPOIB] Prevent a BSOD which happens when restarting the opensm more than once (if...
[mirror/winof/.git] / 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