On Wed, 13 Feb 2002, Greg KH wrote:

> > Yes, I'm referring to 7-29.  I don't have the source handy and my
> > "information" is anecdotal.  It might be a problem with a particular
> > implementation that is not the "standard" USB package for Linux.
> > 
> > If you say it's there, I'll believe you.  On the other hand, if some kind
> > person would send me the source for hub.c I could check for myself. ;-)
> 
> It's available for all at http://www.kernel.org/ :)

Hi Greg and David,

During my ongoing investigation wrt. to the usb_reset_device issue
I just happened to look into this code during the last hour or so.

Yes, I do totally agree with David: there is absolutely _no_ debounce
interval (connect-detect-to-port-reset) implemented in 2.4.18-pre9 hub.c
According to USB 7.1.7.1 this is mandatory and must be TATTDB > 100 ms.
It is also shown in fig. 7-19 of the USB 1.1 specs (I'm validating
vs. 1.1). The mentioned 400ms delay for low speed devices is just were the
debounce delay should be.

I've just done a simple try and yes, this solves an "device not accepting
address..." issue for me: when I connect a 400 mA buspowered device to the
cold port (in contrast to have it already conneted before insmod usbcore
which enables the ports independent from connect events) I always got the
above message. In most cases one of the retries succeded later on anyway.
Admittedly, this might be some device problem or root hub power
instability - but implementing the debounce delay solves this (150-200 ms
were required in this case).

Btw. another concern wrt. to this code from hub.c is, there are several
places calling usb_get_port_status passing a pointer to a stack-located
struct usb_port_status - which becomes the transfer_buffer for the
usb_control_msg) call. Mapping stack locations for PCI-DMA however is
invalid. I'm wondering whether we could simply have shared buffer for this
allocated from khubd instead of spending much effort to alloc/check/free
such stuff at many places.

Martin


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to