From: leonidk Date: Tue, 24 Mar 2009 16:03:15 +0000 (+0000) Subject: [IBBUS] boot in SAN environment. X-Git-Url: http://git.etherboot.org/mirror/winof/.git/commitdiff_plain/673b614500f050fc51ab5f5a683c58908ec7eeaa?ds=sidebyside [IBBUS] boot in SAN environment. this patch adds a 5s delay to wait for hca up for remote boot in SAN environment. Signed off by: James Yang git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2045 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/core/bus/kernel/bus_pnp.c b/core/bus/kernel/bus_pnp.c index a93a7770..59978cae 100644 --- a/core/bus/kernel/bus_pnp.c +++ b/core/bus/kernel/bus_pnp.c @@ -653,9 +653,10 @@ fdo_query_bus_relations( IN IRP* const p_irp, OUT cl_irp_action_t* const p_action ) { - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; /*default to success*/ bus_fdo_ext_t *p_ext; bus_filter_t *p_bfi; + int waitLoop = 0; BUS_ENTER( BUS_DBG_PNP ); @@ -672,16 +673,18 @@ fdo_query_bus_relations( p_bfi = p_ext->bus_filter; CL_ASSERT( p_bfi->magic == BFI_MAGIC ); - if ( p_bfi->ca_guid == 0ULL ) + while ( p_bfi->ca_guid == 0ULL ) { /* HCA not yet bound to a BFI slot (no PNP ADD event seen), no bus * relations yet. */ - status = STATUS_SUCCESS; - BUS_PRINT(BUS_DBG_PNP, ("%s ca_guid %I64x\n",p_bfi->whoami, + BUS_PRINT(BUS_DBG_ERROR, ("%s ca_guid %I64x\n",p_bfi->whoami, p_bfi->ca_guid)); + cl_thread_suspend( 100 ); /* suspend for 100 ms */ + waitLoop++; + if(waitLoop>50) break; } - else + if ( p_bfi->ca_guid != 0ULL ) { status = port_mgr_get_bus_relations( p_bfi->ca_guid, p_irp ); if( status == STATUS_SUCCESS || @@ -1270,6 +1273,7 @@ __fdo_set_power( switch( p_io_stack->Parameters.Power.Type ) { case SystemPowerState: +#if 0 /* * Process on the way up the stack. We cannot block since the * power dispatch function can be called at elevated IRQL if the @@ -1286,7 +1290,7 @@ __fdo_set_power( *p_action = IrpDoNothing; status = STATUS_PENDING; break; - +#endif case DevicePowerState: default: /* Pass down and let the PDO driver handle it. */