]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] USB: Disconnect children during hub unbind
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 18 Nov 2005 17:06:34 +0000 (12:06 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2006 21:48:34 +0000 (13:48 -0800)
commit94c9c90a378c2caf0b39e08246528fe2a6c4d634
treec18d1e04366bee64b62b28d4953fed3c83e85fcc
parentea8a8b0236af1005509ed1ed9ca4e4a78e73d437
[PATCH] USB: Disconnect children during hub unbind

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