[IBAL] Allow disabling the IOC Sweep by setting the poll interval to zero.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 31 Aug 2006 07:14:38 +0000 (07:14 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 31 Aug 2006 07:14:38 +0000 (07:14 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@471 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/kernel/al_ioc_pnp.c

index 7fa9f1e..487019b 100644 (file)
@@ -1218,8 +1218,11 @@ __ioc_pnp_cb(
 \r
        case IB_PNP_PORT_ACTIVE:\r
                /* Initiate a sweep - delay a bit to allow the ports to come up. */\r
-               cl_status = cl_timer_start( &gp_ioc_pnp->sweep_timer, 250 );\r
-               CL_ASSERT( cl_status == CL_SUCCESS );\r
+               if( g_ioc_poll_interval )\r
+               {\r
+                       cl_status = cl_timer_start( &gp_ioc_pnp->sweep_timer, 250 );\r
+                       CL_ASSERT( cl_status == CL_SUCCESS );\r
+               }\r
                break;\r
 \r
        case IB_PNP_PORT_DOWN:\r
@@ -2600,8 +2603,12 @@ __ioc_async_cb(
        CL_ASSERT( !cl_fmap_count( &old_ious ) );\r
 \r
        /* Reset the sweep timer. */\r
-       status = cl_timer_start( &gp_ioc_pnp->sweep_timer, g_ioc_poll_interval );\r
-       CL_ASSERT( status == CL_SUCCESS );\r
+       if( g_ioc_poll_interval )\r
+       {\r
+               status = cl_timer_start(\r
+                       &gp_ioc_pnp->sweep_timer, g_ioc_poll_interval );\r
+               CL_ASSERT( status == CL_SUCCESS );\r
+       }\r
 \r
        /* Release the reference we took in the timer callback. */\r
        deref_al_obj( &gp_ioc_pnp->obj );\r