I had the same problem a while ago. I haven't really looked into the
usb code, but it appears USB devices are detected from a kernel
thread, i.e., asynchronously. When the USB thread has discovered the
device, the dhcp/bootp code has already failed.
The following patch adds the "ip=wait" option. It makes ipconfig.c
retry forever until is has found a suitable device to do
dhcp/bootp/rarp.
This is untested! (I don't have a USB netdevice at home). But at least
it boots ok with a PCI network card (and waits forever if I remove
support for that card from the kernel).
Of course, in the long run, a better solution is an initrd with
dhcp/bootp/rarp client in userspace. But AFAIK there is no Debian
package that does that yet ;-).
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 00:19:03 2001
@@ -102,6 +102,8 @@
int ic_enable __initdata = 0; /* IP config enabled? */
+int ic_wait __initdata = 0; /* wait until a device appears? */
+
/* Protocol choice */
int ic_proto_enabled __initdata = 0
#ifdef IPCONFIG_BOOTP
@@ -1105,8 +1107,12 @@
;
/* Setup all network devices */
- if (ic_open_devs() < 0)
- return -1;
+ if (ic_open_devs() < 0) {
+ if(!ic_wait) return -1;
+
+ printk("IP-Config: Retrying forever...\n");
+ goto try_try_again; // wait a while and try again
+ }
/* Give drivers a chance to settle */
jiff = jiffies + CONF_POST_OPEN;
@@ -1281,6 +1287,8 @@
(strcmp(addrs, "none") != 0));
if (!ic_enable)
return 1;
+
+ ic_wait = *addrs && (strcmp(addrs, "wait") == 0);
if (ic_proto_name(addrs))
return 1;
-
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/