All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] queue usb hotplug events
Date: Sun, 08 Jun 2003 07:23:18 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-105505735107827@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-105498661302046@msgid-missing>

 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.
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-06-08  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-07 11:43 [PATCH] queue usb hotplug events Olaf Hering
2003-06-07 19:22 ` David Brownell
2003-06-07 19:25 ` Olaf Hering
2003-06-07 19:34 ` David Brownell
2003-06-07 19:34 ` Olaf Hering
2003-06-08  7:23 ` Olaf Hering [this message]
2003-06-08 19:10 ` David Brownell
2003-06-09 11:34 ` Olaf Hering
2003-06-09 15:25 ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-105505735107827@msgid-missing \
    --to=olh@suse.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.