From: kfraser@localhost.localdomain Date: Tue, 24 Jul 2007 08:39:00 +0000 (+0100) Subject: xenbus: Wait for 30s for devices to connect (previously 10s). X-Git-Tag: xen-3.2.0~21^2^2~28^2^2~22^2^2~9^2~12^2~23^2~44^2~14^2~19^2~4 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a117c588f510a78a2eada041ec1e134aafa388b6;p=xenclient%2Fkernel.git xenbus: Wait for 30s for devices to connect (previously 10s). Give a visual update to the user on the console every 5s during this period. Signed-off-by: Keir Fraser --- diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index daeb9994..426b3517 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -1072,7 +1072,7 @@ static int print_device_status(struct device *dev, void *data) static int ready_to_wait_for_devices; /* - * On a 10 second timeout, wait for all devices currently configured. We need + * On a 30-second timeout, wait for all devices currently configured. We need * to do this to guarantee that the filesystems and / or network devices * needed for boot are available, before we can allow the boot to proceed. * @@ -1087,18 +1087,30 @@ static int ready_to_wait_for_devices; */ static void wait_for_devices(struct xenbus_driver *xendrv) { - unsigned long timeout = jiffies + 10*HZ; + unsigned long start = jiffies; struct device_driver *drv = xendrv ? &xendrv->driver : NULL; + unsigned int seconds_waited = 0; if (!ready_to_wait_for_devices || !is_running_on_xen()) return; while (exists_disconnected_device(drv)) { - if (time_after(jiffies, timeout)) - break; + if (time_after(jiffies, start + (seconds_waited+5)*HZ)) { + if (!seconds_waited) + printk(KERN_WARNING "XENBUS: Waiting for " + "devices to initialise: "); + seconds_waited += 5; + printk("%us...", 30 - seconds_waited); + if (seconds_waited == 30) + break; + } + schedule_timeout_interruptible(HZ/10); } + if (seconds_waited) + printk("\n"); + bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, print_device_status); }