@@ -113,6 +113,17 @@ config IP_PNP
on NFS" as well), because all other machines configure the network
in their startup scripts.
+config IP_PNP_CARRIER_TIMEOUT
+ int "Wait for carrier timeout (in seconds)"
+ default 120
+ range 0 240
+ depends on IP_PNP
+ help
+ This defines the timeout waiting for carrier in seconds before
+ continuing kernel startup.
+
+ Use the default if unsure.
+
config IP_PNP_DHCP
bool "IP: DHCP support"
depends on IP_PNP
@@ -85,7 +85,8 @@
/* Define the friendly delay before and after opening net devices */
#define CONF_POST_OPEN 10 /* After opening: 10 msecs */
-#define CONF_CARRIER_TIMEOUT 120000 /* Wait for carrier timeout */
+/* Wait for carrier timeout */
+#define CONF_CARRIER_TIMEOUT (CONFIG_IP_PNP_CARRIER_TIMEOUT*1000)
/* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */
#define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */
@@ -268,7 +269,7 @@ static int __init ic_open_devs(void)
/* wait for a carrier on at least one device */
start = jiffies;
- next_msg = start + msecs_to_jiffies(CONF_CARRIER_TIMEOUT/12);
+ next_msg = start + msecs_to_jiffies(20000);
while (time_before(jiffies, start +
msecs_to_jiffies(CONF_CARRIER_TIMEOUT))) {
int wait, elapsed;
@@ -285,7 +286,7 @@ static int __init ic_open_devs(void)
elapsed = jiffies_to_msecs(jiffies - start);
wait = (CONF_CARRIER_TIMEOUT - elapsed + 500)/1000;
pr_info("Waiting up to %d more seconds for network.\n", wait);
- next_msg = jiffies + msecs_to_jiffies(CONF_CARRIER_TIMEOUT/12);
+ next_msg = jiffies + msecs_to_jiffies(20000);
}
have_carrier:
rtnl_unlock();