linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [linux-usb-devel] [PATCH] fix some hubs and hid devices at startup
@ 2002-03-11 22:08 Johannes Erdfelt
  2002-03-12  0:20 ` David Brownell
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Johannes Erdfelt @ 2002-03-11 22:08 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Mar 11, 2002, Greg KH <greg@kroah.com> wrote:
> 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.

The hub driver doesn't talk to devices, so I'll assume you mean the hub
thread, which is actually calling the core for enumeration (setting
address, fetching descriptors, etc)

But the enumeration should be finished by the time the hotplug stuff
finishes.

In that case, nothing should be stomping over each other.

Is it that devices don't like how quickly we let the driver talk to it
after enumeration?

JE


_______________________________________________
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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [linux-usb-devel] [PATCH] fix some hubs and hid devices at startup
@ 2002-05-15 20:08 Olaf Hering
  0 siblings, 0 replies; 13+ messages in thread
From: Olaf Hering @ 2002-05-15 20:08 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Mar 15, Greg KH wrote:

> On Thu, Mar 14, 2002 at 02:21:47PM +0100, Olaf Hering wrote:
> > > The problem looks like the usbdevfs calls are happening at the same time
> > > the hid driver is also talking to the device.
> > > 
> > > Olaf, is this what your log messages show?
> > 
> > It seems so. I think a more correct fix would be a lock in the usbcore
> > code to hold usbdevfs requests when "some bus action" is going on, like
> > this renumbering. You said there is no lock right now for this case?
> 
> This is correct and has been on the list of things to fix in the usb
> code for a while.

What is the status of this bug in the hotplug related functions? We
added a "sleep 3" in the add routing in usb.rc, but that can only be a
workaround.

My idea was that we queue the hotplug events somehow and wait for all
"bus traffic" to complete, the stuff that occours when the usb-uhci
driver is loaded. Something like
insmod usbcore;insmod usb-uhci;modprobe hid;insmod keybdev;insmod mousedev
should work. And it did not with 2.4.19pre2/3, I got timeouts. However,
typing the commands manually to get some delay, and it worked. So I
think that it is not strictly related to usbdevfs, that might be another
bug.

However, after reading the whole thread again, it seems that queuing the
events is maybe not the best solution. What should be done to get this
fixed? (The delay and locking should be in the kernel and not in the
hotplug package).


Gruss Olaf

-- 
 $ man clone

BUGS
       Main feature not yet implemented...

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net
_______________________________________________
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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-05-15 21:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-11 22:08 [linux-usb-devel] [PATCH] fix some hubs and hid devices at startup Johannes Erdfelt
2002-03-12  0:20 ` David Brownell
2002-03-12 20:27 ` Greg KH
2002-03-12 20:29 ` Greg KH
2002-03-12 22:15 ` David Brownell
2002-03-12 22:52 ` Greg KH
2002-03-13  1:52 ` David Brownell
2002-03-14 13:21 ` Olaf Hering
2002-03-15 18:28 ` Greg KH
2002-05-15 20:25 ` David Brownell
2002-05-15 20:37 ` Olaf Hering
2002-05-15 21:37 ` Johannes Erdfelt
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15 20:08 Olaf Hering

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).