[PATCH] USB: Debounce all connect change events
This patch makes the hub driver debounce all connection changes. Right now the driver only does so if the status happens to be CONNECTED at one particular instant. However, the whole point of debouncing is that the connection is subject to transient interruptions until it has stabilized; hence deciding whether to debounce based on a single initial test defeats the entire purpose. There are some additional smaller changes that go along with the major one: Comments added to hub_port_connect_change() detailing the conditions under which it will be called. Don't clear the port's connect-changed feature if it wasn't set. Skip debouncing if there wasn't a physical connection change but only a logical port-enable change (or a firmware-download- induced device morph -- not yet implemented). Clear all the hub status change indicators in hub_events() before handling a connect change. This will reduce syslog clutter from status change bits that remain set while khubd is busy taking care of a new device. The patch includes no changes to the debounce routine itself. Please apply. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment