Re: USB device fails to enumerate after multiple connect and disconnect in host mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 29 Aug 2012, megha dey wrote:

> 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);

No, that's not the right thing to do.

In fact it appears that the bug I mentioned before doesn't exist in the
3.0 kernel.  The bug was added after 3.0, by commit
886486b792e4f6f96d4fbe8ec5bf20811cab7d6a.

So your problem must be caused by something else.  I don't know what.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux