USB2: booting from usb memory issue, including a foolish patch

Daichi GOTO daichi at ongs.co.jp
Wed Feb 18 18:49:04 PST 2009


Hi usb2 folks, first please give me a time to say
congratulations! I'm very glad that usb2 is default
usb stack right now :)

Well but, bad news I have.

I have known that usb2 stack have a issue around boot
from usb devices. System has been engaging root filesystem
mount treatment before completion of device proving in
kernel main thread. It leads root mount fail, then system
boot fails from usb device.

So I have made a patch included. That patch sleeps
30 seconds before root mount treatment while a kernel
thread doing usb2 device probing.

Yes you know, very foolish patch but I have no idea to
fix it in other way. If you have better ideas, please
try and commit that.

Thanks

-- 
   Daichi GOTO, http://people.freebsd.org/~daichi

-------------- next part --------------
--- sys/kern/init_main.c.orig	2009-02-11 01:02:07.000000000 +0900
+++ sys/kern/init_main.c	2009-02-11 01:00:53.000000000 +0900
@@ -608,6 +608,8 @@
 	struct thread *td;
 	struct proc *p;
 
+	pause("Waiting for USB2 devices.", 30000);
+
 	mtx_lock(&Giant);
 
 	GIANT_REQUIRED;


More information about the freebsd-current mailing list