I am hitting a dead end at the rpm_resume function as opposed to rpm_suspend in the commit ID specified.Below is a diff of the file,wherein I have moved the wake_up_all() location,just above the failure case (schedule()) and this solves the issue.I would like to know if this is the right place to apply this change. Also,can this cause some other issues to crop up? diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 1023392..c10b7ad 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -512,7 +512,7 @@ static int rpm_resume(struct device *dev, int rpmflags) break; spin_unlock_irq(&dev->power.lock); - + wake_up_all(&dev->power.wait_queue); schedule(); spin_lock_irq(&dev->power.lock); @@ -608,7 +608,6 @@ static int rpm_resume(struct device *dev, int rpmflags) if (parent) atomic_inc(&parent->power.child_count); } - wake_up_all(&dev->power.wait_queue); if (!retval) rpm_idle(dev, RPM_ASYNC); On Tue, Aug 28, 2012 at 8:06 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Tue, 28 Aug 2012, megha dey wrote: > >> In host mode,while continuously connecting and disconnecting a USB >> device,sometimes enumeration does not happen(kernel 3.0.31).We see >> that the hub_thread is blocked in the schedule() function.The >> following is the function trace: > > ... > >> This happens in the case wherein there is a race condition between the >> suspend (following the disconnect) and the resume (on >> re-connection).Was a similar issue observed in this kernel? Are there >> any patches available? >> >> Also,this issue is not seen on kernel3.4.However ,I require some >> suggestions to resolve this issue on kernel3.0.31. >> >> Kindly provide appropriate feedback. > > Commit f2791d733a2f06997b573d1a3cfde21e6f529826 (PM / Runtime: don't > forget to wake up waitqueue on failure) might solve your problem. > > Alan Stern > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html