]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: debounce before unregistering
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 28 Apr 2008 15:06:28 +0000 (11:06 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:15:47 +0000 (15:15 -0700)
commit24618b0cd42f936cda461bdf6144670a5c925178
treedfcc0d831eb24f7466bbb3ebb2a69b3d93622120
parentb01b03f3ad82b4293f6ca4da9b2692b6a377c609
USB: debounce before unregistering

This patch (as1080) makes a significant change to the way khubd
handles port connect-change and enable-change events.  Both types of
event are now debounced, and the debouncing is carried out _before_ an
existing usb_device is unregistered, instead of afterward.

This means that drivers will have to deal with longer runs of errors
when a device is unplugged, but they are supposed to be prepared for
that in any case.

The advantage is that when an enable-change occurs (caused for example
by electromagnetic interference), the debouncing period will provide
time for the cause of the problem to die away.  A simple port reset
(added in a forthcoming patch) will then allow us to recover from the
fault.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c