• Alan Stern's avatar
    [PATCH] USB: Disconnect children during hub unbind · 7d069b7d
    Alan Stern authored
    This patch (as606b) is an updated version of my earlier patch to
    disconnect children from a hub device when the hub driver is unbound.
    Thanks to the changes in the driver core locking, we now know that the
    entire hub device (and not just the interface) is locked whenever the
    hub driver's disconnect method runs.  Hence it is safe to disconnect the
    child device structures immediately instead of deferring the job.
    
    The earlier version of the patch neglected to disable the hub's ports.
    We don't want to forget that; otherwise we'd end up with live devices
    using addresses that have been recycled.  This update adds the necessary
    code.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    7d069b7d
hub.c 80.6 KB