]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: unbind all interfaces before rebinding them
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 4 Jun 2010 18:02:42 +0000 (14:02 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:50 +0000 (11:22 -0700)
commit3aa5ef87c4fa4be6d538c4cce37b5ea9afec7ca0
tree99bb4489fb3929beab7b25988d2b8c8d05021814
parentf4723b721570bc97eeddc6c4aeea1e2be9f09afb
USB: unbind all interfaces before rebinding them

commit c043f1245654a726925529007210e9f786426448 upstream.

This patch (as1387) fixes a bug introduced during the changeover to
the runtime PM framework.  When a driver doesn't support resume or
reset-resume, and consequently its interfaces need to be unbound and
rebound, we have to unbind all the interfaces before trying to rebind
any of them.  Otherwise the driver's probe method for one interface
could try to claim a different interface and fail, because that other
interface hasn't been unbound yet.

This fixes Bugzilla #15788.  The symptom is that some USB sound cards
don't work after hibernation.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: François Valenduc <francois.valenduc@tvcablenet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c