Add support for SM, LID, and GID change by flagging adapter as hung.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 16 Sep 2005 18:52:31 +0000 (18:52 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 16 Sep 2005 18:52:31 +0000 (18:52 +0000)
Tweaks to debug output sumbitted by Yossi Leybovich (sleybo@mellanox.co.il)

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@69 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_adapter.c
ulp/ipoib/kernel/ipoib_driver.c
ulp/ipoib/kernel/ipoib_endpoint.c
ulp/ipoib/kernel/ipoib_endpoint.h

index d318065..56e048f 100644 (file)
@@ -500,6 +500,9 @@ __ipoib_pnp_cb(
                return IB_NOT_DONE;\r
        }\r
 \r
+       IPOIB_TRACE( IPOIB_DBG_INFO,\r
+               ("p_pnp_rec->pnp_event = 0x%x\n",p_pnp_rec->pnp_event));\r
+\r
        switch( p_pnp_rec->pnp_event )\r
        {\r
        case IB_PNP_PORT_ADD:\r
@@ -606,15 +609,16 @@ __ipoib_pnp_cb(
                status = IB_SUCCESS;\r
                break;\r
 \r
+       default:\r
+               IPOIB_TRACE( IPOIB_DBG_INFO,\r
+                       ("IPOIB: Received unhandled PnP event 0x%x\n",\r
+                       p_pnp_rec->pnp_event) );\r
+               /* Fall through. */\r
        case IB_PNP_PKEY_CHANGE:\r
        case IB_PNP_SM_CHANGE:\r
        case IB_PNP_GID_CHANGE:\r
        case IB_PNP_LID_CHANGE:\r
-               /* TODO: Refresh all multicast group memberships in case the SM changed. */\r
-               IPOIB_TRACE( IPOIB_DBG_INFO,\r
-                       ("IPOIB: Received unhandled PnP event %d\n",\r
-                       p_pnp_rec->pnp_event) );\r
-       default:\r
+               p_adapter->hung = TRUE;\r
                status = IB_SUCCESS;\r
                break;\r
        }\r
index 38ec84e..af855db 100644 (file)
@@ -2103,6 +2103,8 @@ ipoib_reg_addrs(
                cl_memcpy( &ib_service.svc_rec.service_data8[ATS_IPV4_OFFSET],\r
                        p_addr_item->address.as_bytes, IPV4_ADDR_SIZE );\r
 \r
+               /* Take a reference for each service request. */\r
+               cl_obj_ref(&p_adapter->obj);\r
                ib_status = p_adapter->p_ifc->reg_svc(\r
                        p_adapter->h_al, &ib_service, &p_addr_item->p_reg->h_reg_svc );\r
                if( ib_status != IB_SUCCESS )\r
@@ -2134,6 +2136,7 @@ ipoib_reg_addrs(
                                        p_adapter->p_ifc->get_err_str( ib_status )) );\r
                                p_adapter->hung = TRUE;\r
                        }\r
+                       cl_obj_deref(&p_adapter->obj);\r
                        cl_free( p_addr_item->p_reg );\r
                        p_addr_item->p_reg = NULL;\r
                }\r
@@ -2223,6 +2226,7 @@ __ipoib_ats_reg_cb(
        }\r
 \r
        cl_obj_unlock( &p_reg->p_adapter->obj );\r
+       cl_obj_deref(&p_reg->p_adapter->obj);\r
 \r
        IPOIB_EXIT( IPOIB_DBG_OID );\r
 }\r
index 5fe1c54..2c62c2a 100644 (file)
@@ -196,7 +196,7 @@ __endpt_destroying(
        }\r
        cl_obj_unlock( p_obj );\r
        \r
-       IPOIB_EXIT( IPOIB_DBG_INIT );\r
+       IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
 }\r
 \r
 \r
index a4de33c..58a6eed 100644 (file)
@@ -148,7 +148,7 @@ ipoib_endpt_deref(
 {\r
        IPOIB_ENTER( IPOIB_DBG_ENDPT );\r
        cl_obj_deref( &p_endpt->obj );\r
-       IPOIB_EXIT( IPOIB_DBG_INIT );\r
+       IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
 }\r
 \r
 \r