[IPoIB] Handle SA interaction failures during port activation
[mirror/winof/.git] / ulp / ipoib / kernel / ipoib_port.c
index dedc1d5..f501530 100644 (file)
@@ -4496,12 +4496,14 @@ __port_info_cb(
                NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,\r
                        EVENT_IPOIB_PORT_INFO_TIMEOUT, 0 );\r
                IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query timed out.\n") );\r
+               ipoib_set_inactive( p_port->p_adapter );\r
                break;\r
 \r
        case IB_REMOTE_ERROR:\r
                NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,\r
                        EVENT_IPOIB_PORT_INFO_REJECT, 0 );\r
                IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query rejected by SA.\n") );\r
+               ipoib_set_inactive( p_port->p_adapter );\r
                break;\r
 \r
        default:\r
@@ -4509,6 +4511,7 @@ __port_info_cb(
                        EVENT_IPOIB_QUERY_PORT_INFO, 1, p_query_rec->status );\r
                /* Hopefully we'll get an SM change event that will restart things. */\r
                IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query failed.\n") );\r
+               ipoib_set_inactive( p_port->p_adapter );\r
        }\r
 \r
        /* Return the response MAD to AL. */\r
@@ -4640,8 +4643,7 @@ __bcast_get_cb(
        default:\r
                NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,\r
                        EVENT_IPOIB_BCAST_GET, 1, p_query_rec->status );\r
-               /* Flag the adapter as hung. */\r
-               p_port->p_adapter->hung = TRUE;\r
+               ipoib_set_inactive( p_port->p_adapter );\r
        }\r
 \r
        /* Return the response MAD to AL. */\r
@@ -4885,8 +4887,7 @@ __bcast_cb(
                {\r
                        NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,\r
                                EVENT_IPOIB_BCAST_JOIN, 1, p_mcast_rec->status );\r
-                       /* Flag the adapter as hung. */\r
-                       p_port->p_adapter->hung = TRUE;\r
+                       ipoib_set_inactive( p_port->p_adapter );\r
                }\r
 \r
                cl_obj_deref( &p_port->obj );\r
@@ -5152,8 +5153,7 @@ __mcast_cb(
                IPOIB_TRACE( IPOIB_DBG_ERROR,\r
                        ("Multicast join request failed with status %s.\n",\r
                        p_port->p_adapter->p_ifc->get_err_str( p_mcast_rec->status )) );\r
-               /* Flag the adapter as hung. */\r
-               p_port->p_adapter->hung = TRUE;\r
+               ipoib_set_inactive( p_port->p_adapter );\r
                cl_obj_deref( &p_port->obj );\r
                IPOIB_EXIT( IPOIB_DBG_MCAST );\r
                return;\r