Mercurial > illumos > illumos-gate
changeset 11987:7f7a1bfba119
6935545 usba may try to load consconfig from disk after bop_unmountroot() and before mounting root fs
author | fei feng - Sun Microsystems - Beijing China <Fei.Feng@Sun.COM> |
---|---|
date | Wed, 24 Mar 2010 14:59:35 +0800 |
parents | fef9abb0309c |
children | 89d5c26693a6 |
files | usr/src/uts/common/io/usb/usba/hubdi.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/usb/usba/hubdi.c Wed Mar 24 10:16:11 2010 +0800 +++ b/usr/src/uts/common/io/usb/usba/hubdi.c Wed Mar 24 14:59:35 2010 +0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -151,6 +151,7 @@ uint_t hubdi_errmask = (uint_t)-1; uint8_t hubdi_min_pm_threshold = 5; /* seconds */ uint8_t hubdi_reset_delay = 20; /* seconds */ +extern int modrootloaded; /* * initialize private data @@ -3650,9 +3651,12 @@ * Before console is init'd, we temporarily block the hotplug * threads so that BUS_CONFIG_ONE through hubd_bus_config() can be * processed quickly. This reduces the time needed for vfs_mountroot() - * to mount the root FS from a USB disk. + * to mount the root FS from a USB disk. And on SPARC platform, + * in order to load 'consconfig' successfully after OBP is gone, + * we need to check 'modrootloaded' to make sure root filesystem is + * available. */ - while (!consconfig_console_is_ready()) { + while (!modrootloaded || !consconfig_console_is_ready()) { delay(drv_usectohz(10000)); }