Fix to "Avoid the SM" 
signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
===================================================================
--- ipoib_port.c        (revision 3149)
+++ ipoib_port.c        (working copy)
@@ -2357,6 +2357,11 @@
                        /* Out of date!  Destroy the endpoint and replace it. */
                        __endpt_mgr_remove( p_port, *pp_src );
                        *pp_src = NULL;
+               }
+               else if ( ! ((*pp_src)->dlid)) {
+                       /* Out of date!  Destroy the endpoint and replace it. */
+                       __endpt_mgr_remove( p_port, *pp_src );
+                       *pp_src = NULL;
                }
                else if( ipoib_is_voltaire_router_gid( &(*pp_src)->dgid ) )
                {
@@ -4153,10 +4158,25 @@
        cl_qlist_init( &mc_list );
       
        cl_obj_lock( &p_port->obj );
+
        /* Wait for all readers to complete. */
        while( p_port->endpt_rdr )
                ;
+#if 0
+               __endpt_mgr_remove_all(p_port);
+#else

+       NdisMIndicateStatus( p_port->p_adapter->h_adapter,
+                                       NDIS_STATUS_MEDIA_DISCONNECT, NULL, 0 );
+       NdisMIndicateStatusComplete( p_port->p_adapter->h_adapter );
+      
+       NdisMIndicateStatus( p_port->p_adapter->h_adapter,
+                                       NDIS_STATUS_MEDIA_CONNECT, NULL, 0 );
+       NdisMIndicateStatusComplete( p_port->p_adapter->h_adapter );
+      
+
        if( p_port->p_local_endpt )
        {
                cl_qmap_remove_item( &p_port->endpt_mgr.mac_endpts,
