• Alan Stern's avatar
    USB: debounce before unregistering · 24618b0c
    Alan Stern authored
    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: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    24618b0c
hub.c 94.9 KB