Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174419
b: refs/heads/master
c: ae78880
h: refs/heads/master
i:
  174417: a09502f
  174415: fb7f438
v: v3
  • Loading branch information
Paolo Bonzini authored and Jeremy Fitzhardinge committed Dec 3, 2009
1 parent 0799789 commit b6726b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8dc33088febc63286b7a60e6b678de8e064de8e
refs/heads/master: ae7888012969355a548372e99b066d9e31153b62
20 changes: 16 additions & 4 deletions trunk/drivers/xen/xenbus/xenbus_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,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 5-minute 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.
*
Expand All @@ -916,18 +916,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 || !xen_domain())
return;

while (exists_connecting_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...", 300 - seconds_waited);
if (seconds_waited == 300)
break;
}

schedule_timeout_interruptible(HZ/10);
}

if (seconds_waited)
printk("\n");

bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
print_device_status);
}
Expand Down

0 comments on commit b6726b4

Please sign in to comment.