linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] fix some hubs and hid devices at startup
Date: Wed, 20 Mar 2002 14:53:47 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-101663630917624@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-101588404108690@msgid-missing>

On Mon, Mar 11, Greg KH wrote:

> Hi,
> 
> Since the latest USB patch went in that added a proper delay to the
> hub connection sequence, a lot of people have been reporting odd
> problems with some USB hubs, keyboards, and mice.  I've seen this
> problem too.  It is usually fixed by just replugging the device in, but
> not all of the time.
> 
> The reason seems to be that usbmodules is getting called from the
> hotplug package at the same time the hub driver is talking to the
> device.  Since we don't have control endpoint locking in the kernel USB
> code yet, this messes things up :)
> 
> The patch below, from Olaf Hering, seems to fix the problem.  Also just
> removing the usbmodules binary seems to fix it for other people, but
> that's not really a good fix.
> 
> Let me know what you think about this.
> 
> thanks,
> 
> greg k-h
> 
> 
> Index: etc/hotplug/usb.agent
> =================================> RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/usb.agent,v
> retrieving revision 1.19
> diff -a -u -r1.19 usb.agent
> --- etc/hotplug/usb.agent	18 Jan 2002 03:10:42 -0000	1.19
> +++ etc/hotplug/usb.agent	11 Mar 2002 21:52:10 -0000
> @@ -297,6 +297,9 @@
>  case $ACTION in
>  
>  add)
> +    # Let the usb subsystem finish talking to the device, before we do
> +    sleep 3
> +
>      usb_convert_vars
>  
>      FOUNDúlse


That patch does indeed fix the problem with some devices, sometimes you
even need a sleep 5.

But since all that runs in background the bootscripts will continue to
run. And if gpm wants the /dev/input/mice node and the mousedriver is
not loaded ...
Or printer.o and rclpd, everything fails :)

The delay has to be added, either to the hotplug scripts or to the
usbdevfs core. But it will delay the driver loading in both cases, so
the startup scripts may fail. It depends on your configuration and the
speed of your cpu and/or IO.


Gruss Olaf

-- 
 $ man clone

BUGS
       Main feature not yet implemented...

_______________________________________________
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:[~2002-03-20 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-11 21:50 [PATCH] fix some hubs and hid devices at startup Greg KH
2002-03-12 20:33 ` Greg KH
2002-03-20 14:53 ` Olaf Hering [this message]
2002-03-20 17:19 ` Greg KH

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-101663630917624@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).