lkml.org 
[lkml]   [2002]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: IP Autoconfig doesn't work for USB network devices

On Sat, 16 Mar 2002 rob1@rekl.yi.org wrote:
> I tried the suggestion in this thread:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=100912381726661&w=2
>
> It made no difference. I also looked through the messages on
> linux-usb-devel, but they seem to be more related to having USB floppies
> or USB hard drives recognized, instead of network cards, which I believe
> is my problem.

That's right. I made a separate patch for USB (or other hotplug)
network cards (see below).

Eric


--- linux-2.4.9-ac7/net/ipv4/ipconfig.c.orig Wed May 2 05:59:24 2001
+++ linux-2.4.9-ac7/net/ipv4/ipconfig.c Tue Sep 18 17:16:07 2001
@@ -80,6 +80,8 @@
#define CONF_PRE_OPEN (HZ/2) /* Before opening: 1/2 second */
#define CONF_POST_OPEN (1*HZ) /* After opening: 1 second */

+#define CONF_DEV_WAIT (1*HZ)
+
/* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */
#define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */
#define CONF_SEND_RETRIES 6 /* Send six requests per open */
@@ -1105,8 +1107,20 @@
;

/* Setup all network devices */
- if (ic_open_devs() < 0)
+ while (ic_open_devs() < 0) {
+#ifdef CONFIG_ROOT_NFS
+ if (ROOT_DEV == MKDEV(UNNAMED_MAJOR, 255)) {
+ printk(KERN_ERR
+ "IP-Config: Retrying forever (NFS root)...\n");
+
+ // wait a while and try again
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(CONF_DEV_WAIT);
+ continue;
+ }
+#endif
return -1;
+ }

/* Give drivers a chance to settle */
jiff = jiffies + CONF_POST_OPEN;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.742 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site