aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-06-04 14:02:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-04 16:16:20 -0400
commitc043f1245654a726925529007210e9f786426448 (patch)
tree67c3707d03183b51a111e90a6652ff472ce653aa /drivers/usb/core/driver.c
parent109f34e71b9049a57f6cdf3f1da6bee2b722b259 (diff)
USB: unbind all interfaces before rebinding them
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> Cc: stable <stable@kernel.org> [.34] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index ded550eda5d9..de98a94d1853 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1328,6 +1328,7 @@ int usb_resume(struct device *dev, pm_message_t msg)
1328 1328
1329 /* For all other calls, take the device back to full power and 1329 /* For all other calls, take the device back to full power and
1330 * tell the PM core in case it was autosuspended previously. 1330 * tell the PM core in case it was autosuspended previously.
1331 * Unbind the interfaces that will need rebinding later.
1331 */ 1332 */
1332 } else { 1333 } else {
1333 status = usb_resume_both(udev, msg); 1334 status = usb_resume_both(udev, msg);
@@ -1336,6 +1337,7 @@ int usb_resume(struct device *dev, pm_message_t msg)
1336 pm_runtime_set_active(dev); 1337 pm_runtime_set_active(dev);
1337 pm_runtime_enable(dev); 1338 pm_runtime_enable(dev);
1338 udev->last_busy = jiffies; 1339 udev->last_busy = jiffies;
1340 do_unbind_rebind(udev, DO_REBIND);
1339 } 1341 }
1340 } 1342 }
1341 1343