On Thu, 14 Feb 2002, Greg KH wrote:

> > * usb_hub_port_debounce() provides the required debounce delay including
> >   the "restart delay when spurious disconnect detected" behaviour
> 
> Looks good.  But why aren't you restarting the timeout when you detect a
> disconnect? 
> Right now it looks if you see a disconnect for 30ms, then
> you error out.

Every time the port status is seen disconnected, the delay_time counter
_is_ reset to 0 - hence the timeout restarts as required. And delay_time
is only advanced when portstatus was connected. The bogus_discon counter
is there to detect and treat three (30ms) consecutive status==disconnect
samples as real disconnect. It's not in the specs but something like this
is required or you would end up looping and resetting the timeout forever,
should there be a real disconnect during the debounce delay. Easy to
trigger with the dev. board.

However, I think there is something which could be done better: currently
the portstatus is sampled every 10 ms and the connect _status_ is what we
look at. Hence we might miss short transient disconnect/reconnect changes
between the sample. I'm going to change this to use the port connect
_change_ information.

> > Patch created and tested with 2.4.18-pre9.
> 
> Again, I'd like to try this out in 2.5.x for a while before adding it to
> 2.4.

Absolutely. It's just my target platform is 2.4 and 2.5.x has too many
quirks for me at the moment to use it in parallel. Hence stuff gets created
and tested for 2.4.

Martin


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

Reply via email to