]> err.no Git - linux-2.6/commit
USB: Don't rebind before "complete" callback
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 12 Aug 2008 18:34:14 +0000 (14:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Aug 2008 17:26:37 +0000 (10:26 -0700)
commit5096aedcd2eb70fbea83f09281f97f9ec973d9de
treea1ed2e8486837fd2f0751802e7602c33f3b9fe8c
parentf2189c477c986db47ac7f9cc32d05f6df18bfe9e
USB: Don't rebind before "complete" callback

This patch (as1130) fixes an incompatibility between the new PM
infrastructure and USB power management.  We are not allowed to call
drivers' probe routines during a system sleep transition between the
"prepare" and "complete" callbacks, but that's exactly what we do when
a driver doesn't have full suspend/resume support.  Such drivers are
unbound during the "suspend" call and reprobed during the "resume" call.

The patch causes the reprobe step to be skipped if the "complete"
callback hasn't been issued yet, i.e., if the interface's
dev.power.status field is not equal to DPM_ON.  Thus during the
"resume" callback nothing bad will happen, and during the final
"complete" callback the reprobing will occur as desired.

This fixes the problem reported in Bugzilla #11263.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c