On Sat, Jun 07, David Brownell wrote: > Olaf Hering wrote: > >Hi, > > > >there is a hardcoded sleep 3 in the usb.agent. But this is wrong, > >because the kernel runs all hotplug events at once for a new hub. The > >result is that every event still runs in parallel, just 3 seconds later. > > That "sleep" is a workaround for "uhci" and "usb-uhci" bugs:
you can change that to sleep 1 or sleep 42 or sleep $largenum, they will still run in parallel. This one solves it. touch "${REMOVER}.queue.$$" sleep 3 & MAX_DELAY=$! while [ -d /proc/$MAX_DELAY ] ; do lockfiles=`ls -t /var/run/usb/*.queue.* 2>/dev/null` pid=${lockfiles##*.} test "$pid" = "$$" && { debug_mesg pid $$ proceeds ; break; } test "$lockfiles" = "" && { debug_mesg all lockfiles gone ; break; } debug_mesg wait 1 second for pid $pid sleep 0.5 done Now you have zero delay for the first event. -- USB is for mice, FireWire is for men! ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel