• Alan Stern's avatar
    [PATCH] USB: Centralize logical disconnects in the hub driver · 7a5baeee
    Alan Stern authored
    This patch takes some code that was only used in one place in the hub
    driver, and packages it up into a subroutine which is now called from
    several places.  The routine does a logical disconnect -- for example,
    after issuing a port reset, if the device descriptors have changed
    (because of a firmware update perhaps) we logically disconnect the old
    device structure and create a new one.  Or if a resume fails for any
    reason we can do the same thing.
    
    This touches some of David Brownell's suspend/resume code, obviously.
    (It also fixes a couple of small errors in there.)  He has said it looks
    okay.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    7a5baeee
hub.c 74.2 KB