]> pilppa.org Git - linux-2.6-omap-h63xx.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)
commit7d069b7d80933004282c48edbe62526e4cb0aecc
treec18d1e04366bee64b62b28d4953fed3c83e85fcc
parent9ad3d6ccf5eee285e233dbaf186369b8d477a666
[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