All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Mandeep Singh Baines <mandeep.baines@gmail.com>,
	linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Mandeep Singh Baines <msb@chromium.org>,
	linux-pm@vger.kernel.org, stable@kernel.org,
	Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	Kevin Hilman <khilman@ti.com>, Colin Cross <ccross@android.com>,
	Sameer Nanda <snanda@chromium.org>,
	Olof Johansson <olofj@chromium.org>
Subject: Re: [PATCH] PM: Prevent waiting forever on asynchronous suspend after abort
Date: Wed, 20 Jun 2012 08:13:55 -0700	[thread overview]
Message-ID: <20120620151355.GC13770@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1206201046020.1804-100000@iolanthe.rowland.org>

On Wed, Jun 20, 2012 at 10:58:25AM -0400, Alan Stern wrote:
> On Tue, 19 Jun 2012, Mandeep Singh Baines wrote:
> 
> > __device_suspend() must always send a completion. Otherwise, parent
> > devices will wait forever.
> > 
> > Commit 1e2ef05b, "PM: Limit race conditions between runtime PM and
> > system sleep (v2)", introduced a regression by short-circuiting the
> > complete_all() for certain error cases.
> > 
> > This patch fixes the bug by always signalling a completion.
> > 
> > Addresses http://crosbug.com/31972
> > 
> > Tested by injecting an abort via the following patch:
> > 
> > diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
> > index a004db3..e5a6fce 100644
> > --- a/drivers/usb/core/hcd-pci.c
> > +++ b/drivers/usb/core/hcd-pci.c
> > @@ -21,6 +21,7 @@
> >  #include <linux/pci.h>
> >  #include <linux/usb.h>
> >  #include <linux/usb/hcd.h>
> > +#include <linux/string.h>
> > 
> >  #include <asm/io.h>
> >  #include <asm/irq.h>
> > @@ -477,6 +478,8 @@ static int resume_common(struct device *dev, int event)
> > 
> >  static int hcd_pci_suspend(struct device *dev)
> >  {
> > +       if (!strcmp("0000:00:1d.3", dev_name(dev)))
> > +               return -EBUSY;
> >         return suspend_common(dev, device_may_wakeup(dev));
> >  }
> 
> When you include one patch in front of another like this, doesn't it 
> confuse the automatic tools?  You might end up getting both changes 
> include in the final commit.  :-)

Yeah, that's going to mess with quilt big time, I don't know what git is
going to do with it, it should be interesting to see...

greg k-h

  reply	other threads:[~2012-06-20 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  2:17 [PATCH] PM: Prevent waiting forever on asynchronous suspend after abort Mandeep Singh Baines
2012-06-20 14:58 ` Alan Stern
2012-06-20 15:13   ` Greg Kroah-Hartman [this message]
2012-06-20 16:47   ` Mandeep Baines
2012-06-20 16:13 ` mandeep.baines
2012-06-21 20:43   ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2012-06-20  2:08 Mandeep Singh Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120620151355.GC13770@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ccross@android.com \
    --cc=khilman@ti.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mandeep.baines@gmail.com \
    --cc=msb@chromium.org \
    --cc=olofj@chromium.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=snanda@chromium.org \
    --cc=stable@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.