[IBBUS] boot in SAN environment.
[mirror/winof/.git] / core / bus / kernel / bus_pnp.c
index a93a777..59978ca 100644 (file)
@@ -653,9 +653,10 @@ fdo_query_bus_relations(
        IN                                      IRP* const                              p_irp, \r
                OUT                             cl_irp_action_t* const  p_action )\r
 {\r
-       NTSTATUS                        status;\r
+       NTSTATUS                        status = STATUS_SUCCESS; /*default to success*/\r
        bus_fdo_ext_t           *p_ext;\r
        bus_filter_t            *p_bfi;\r
+       int                                     waitLoop = 0;\r
 \r
        BUS_ENTER( BUS_DBG_PNP );\r
 \r
@@ -672,16 +673,18 @@ fdo_query_bus_relations(
        p_bfi = p_ext->bus_filter;\r
        CL_ASSERT( p_bfi->magic == BFI_MAGIC );\r
 \r
-       if ( p_bfi->ca_guid == 0ULL )\r
+       while ( p_bfi->ca_guid == 0ULL )\r
        {\r
                /* HCA not yet bound to a BFI slot (no PNP ADD event seen), no bus\r
                 * relations yet.\r
                 */\r
-               status = STATUS_SUCCESS;\r
-               BUS_PRINT(BUS_DBG_PNP, ("%s ca_guid %I64x\n",p_bfi->whoami,\r
+               BUS_PRINT(BUS_DBG_ERROR, ("%s ca_guid %I64x\n",p_bfi->whoami,\r
                                                                p_bfi->ca_guid));\r
+               cl_thread_suspend( 100 );       /* suspend for 100 ms */\r
+               waitLoop++;\r
+               if(waitLoop>50) break;\r
        }\r
-       else\r
+       if ( p_bfi->ca_guid != 0ULL )\r
        {\r
                status = port_mgr_get_bus_relations( p_bfi->ca_guid, p_irp );\r
                if( status == STATUS_SUCCESS || \r
@@ -1270,6 +1273,7 @@ __fdo_set_power(
        switch( p_io_stack->Parameters.Power.Type )\r
        {\r
        case SystemPowerState:\r
+#if 0\r
                /*\r
                 * Process on the way up the stack.  We cannot block since the \r
                 * power dispatch function can be called at elevated IRQL if the\r
@@ -1286,7 +1290,7 @@ __fdo_set_power(
                *p_action = IrpDoNothing;\r
                status = STATUS_PENDING;\r
                break;\r
-\r
+#endif\r
        case DevicePowerState:\r
        default:\r
                /* Pass down and let the PDO driver handle it. */\r