lkml.org 
[lkml]   [2011]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume support of ehci and ohci
    On Mon, 4 Jul 2011, Felipe Balbi wrote:

    > sounds to me like a bug on pm runtime ? If you're calling
    > pm_runtime_*_sync() family, shouldn't all calls be _sync() too ?

    No. This was a deliberate design decision. It minimizes stack usage
    and it gives a chance for some other child to resume before the parent
    is powered down.

    > > static int rpm_suspend(struct device *dev, int rpmflags)
    > > __releases(&dev->power.lock) __acquires(&dev->power.lock)
    > > {
    > > .
    > > .
    > > .
    > > no_callback:
    > > .
    > > .
    > > .
    > > /* Maybe the parent is now able to suspend. */
    > > if (parent && !parent->power.ignore_children &&
    > > !dev->power.irq_safe) {
    > > spin_unlock(&dev->power.lock);
    > >
    > > spin_lock(&parent->power.lock);
    > > rpm_idle(parent, RPM_ASYNC);
    >
    > to me this is bogus, if you called pm_runtime_put_sync() should should
    > be sync too. Shouldn't it ?

    No, it shouldn't.

    > > spin_unlock(&parent->power.lock);
    > >
    > > spin_lock(&dev->power.lock);
    > > }
    > > This is the reason of directly calling the parent Runtime PM calls from
    > > the children.
    > > If directly calling Runtime PM APIs with parent dev-pointer isn't
    > > acceptable,
    > > this can be achieved by exporting wrapper APIs from the
    > > parent and calling them from the chidren .suspend/.resume routines.
    >
    > Still no good, IMHO.

    The real problem here is that you guys are trying to use the runtime PM
    framework to carry out activities during system suspend. That won't
    work; it's just a bad idea all round. Use the proper callbacks to do
    what you want.

    Alan Stern



    \
     
     \ /
      Last update: 2011-07-04 18:03    [W:0.021 / U:58.872 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site