On Thu, 18 Mar 2004, Alan Stern wrote:

> On Thu, 18 Mar 2004, David Brownell wrote:
> 
> > Matthias Andree wrote:
> > > I call it excessive because I wonder if it's correct to feed a hotplug
> > > event just because $USER_SPACE_PROGRAM has decided to open a
> > > /proc/bus/usb/MMM/NNN device.
> > 
> > Are you sure that's what's making it happen?  Or is your
> > software maybe trying to set the configuration?  That would
> > get rid of the old devices, and create new ones.
> 
> Something definitely is setting the configuration.  The interface 
> registration events are in the system log.
> 
> > Software that tries to change the device configuration would
> > certainly cause lots of hotplugging.  Basically that's a bad
> > idea.  There's a call to just _reset_ the configuration, that
> > verges on reasonable ... for devices that only have a single
> > driver on the device interfaces.
> 
> That's part of the problem.  Another part is that whatever program is 
> running as the hotplug agent is using timeouts of 0.1 seconds to read the 
> device and configuration descriptors.  It should be using something more 
> like 5 seconds.

I believe I've identified the trigger of the problem. Log attached
(Linux 2.6), with usb.agent running with "set -x".

I don't understand why this hotplug version executes several processes
of usb.agent for the same device at the same time, but that's probably
off-topic for this list.

Hotplug's usb.agent runs usbmodules, and just sampling one of the
usbmodules invocations from the log and feeding them through strace
yields:

...
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
open("/proc/bus/usb/003/002", O_RDWR)   = 3
ioctl(3, USBDEVFS_CONTROL, 0xbfffefb0)  = 18
ioctl(3, USBDEVFS_CONTROL, 0xbfffeb70)  = 9
ioctl(3, USBDEVFS_CONTROL, 0xbfffeb70)  = 32
close(3)                                = 0
exit_group(0)                           = ?

So we do know that usbmodules run on behalf of hotplug issues
USBDEVFS_CONTROL.

I'll now see what 2.4 does and spam Yet Another Log into this list.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to