diff options
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 9246a8c4ecf2..649fcdf114b7 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -901,7 +901,7 @@ static int print_device_status(struct device *dev, void *data) | |||
901 | static int ready_to_wait_for_devices; | 901 | static int ready_to_wait_for_devices; |
902 | 902 | ||
903 | /* | 903 | /* |
904 | * On a 10 second timeout, wait for all devices currently configured. We need | 904 | * On a 5-minute timeout, wait for all devices currently configured. We need |
905 | * to do this to guarantee that the filesystems and / or network devices | 905 | * to do this to guarantee that the filesystems and / or network devices |
906 | * needed for boot are available, before we can allow the boot to proceed. | 906 | * needed for boot are available, before we can allow the boot to proceed. |
907 | * | 907 | * |
@@ -916,18 +916,30 @@ static int ready_to_wait_for_devices; | |||
916 | */ | 916 | */ |
917 | static void wait_for_devices(struct xenbus_driver *xendrv) | 917 | static void wait_for_devices(struct xenbus_driver *xendrv) |
918 | { | 918 | { |
919 | unsigned long timeout = jiffies + 10*HZ; | 919 | unsigned long start = jiffies; |
920 | struct device_driver *drv = xendrv ? &xendrv->driver : NULL; | 920 | struct device_driver *drv = xendrv ? &xendrv->driver : NULL; |
921 | unsigned int seconds_waited = 0; | ||
921 | 922 | ||
922 | if (!ready_to_wait_for_devices || !xen_domain()) | 923 | if (!ready_to_wait_for_devices || !xen_domain()) |
923 | return; | 924 | return; |
924 | 925 | ||
925 | while (exists_connecting_device(drv)) { | 926 | while (exists_connecting_device(drv)) { |
926 | if (time_after(jiffies, timeout)) | 927 | if (time_after(jiffies, start + (seconds_waited+5)*HZ)) { |
927 | break; | 928 | if (!seconds_waited) |
929 | printk(KERN_WARNING "XENBUS: Waiting for " | ||
930 | "devices to initialise: "); | ||
931 | seconds_waited += 5; | ||
932 | printk("%us...", 300 - seconds_waited); | ||
933 | if (seconds_waited == 300) | ||
934 | break; | ||
935 | } | ||
936 | |||
928 | schedule_timeout_interruptible(HZ/10); | 937 | schedule_timeout_interruptible(HZ/10); |
929 | } | 938 | } |
930 | 939 | ||
940 | if (seconds_waited) | ||
941 | printk("\n"); | ||
942 | |||
931 | bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, | 943 | bus_for_each_dev(&xenbus_frontend.bus, NULL, drv, |
932 | print_device_status); | 944 | print_device_status); |
933 | } | 945 | } |