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: Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
Date: Mon, 2 May 2016 08:54:48 -0700	[thread overview]
Message-ID: <20160502155448.GD15941@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1605021125350.24296-100000@netrider.rowland.org>

On Mon, May 02, 2016 at 11:26:01AM -0400, Alan Stern wrote:
> On Mon, 2 May 2016, Greg Kroah-Hartman wrote:
> 
> > On Mon, May 02, 2016 at 11:13:10AM -0400, Alan Stern wrote:
> > > On Mon, 2 May 2016, Johan Hovold wrote:
> > > 
> > > > This reverts commit e3345db85068ddb937fc0ba40dfc39c293dad977, which
> > > > broke system resume for a large class of devices.
> > > > 
> > > > Devices that after having been reset during resume need to be rebound
> > > > due to a missing reset_resume callback, are now left in a suspended
> > > > state. This specifically broke resume of common USB-serial devices,
> > > > which are now unusable after system suspend (until disconnected and
> > > > reconnected) when USB persist is enabled.
> > > > 
> > > > During resume, usb_resume_interface will set the needs_binding flag for
> > > > such interfaces, but unlike system resume, run-time resume does not
> > > > honour it.
> > > > 
> > > > Cc: stable <stable@vger.kernel.org>	# 4.5
> > > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > > ---
> > > > 
> > > > Greg, Alan,
> > > > 
> > > > This patch for v4.6-rc7 fixes a 4.5-regression that broke system suspend
> > > > for a large class of devices, including USB-serial devices, for example
> > > > when USB persist is enabled.
> > > > 
> > > > We may be able to find a way around this, but since it's a user-visible
> > > > regression and late in the rc-cycle, I believe reverting the offending
> > > > commit is the right thing to do.
> > > 
> > > The description of the problem doesn't sound right to me.  For 
> > > instance, would it help if usb_runtime_resume() did honor the 
> > > needs_binding flag?  I doubt it.  Things like the wakeup setting would 
> > > still be lost before the runtime resume occurred.
> > > 
> > > I suspect the right answer is always to resume a USB device if it needs 
> > > a reset-resume, but otherwise allow it to remain in runtime suspend.
> > > 
> > > Reverting the patch for now is okay with me.  Tomeu may want to work on
> > > a better solution.  Part of the difficulty is that the PM core wants to
> > > know before suspending whether skipping resume will be okay, but the
> > > USB stack doesn't know until after the host controller has been 
> > > resumed.
> > > 
> > > In the end, we'll probably have the PM core call usb_resume all the 
> > > time, but usb_resume will leave the device in runtime suspend if it 
> > > can.  This isn't ideal but it may be the best we can do.
> > 
> > So is that an "acked-by" for this revert?
> 
> Yes.

Great, now applied, thanks.

greg k-h

  reply	other threads:[~2016-05-02 15:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 13:35 [PATCH] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" Johan Hovold
2016-05-02 15:13 ` Alan Stern
2016-05-02 15:22   ` Greg Kroah-Hartman
2016-05-02 15:26     ` Alan Stern
2016-05-02 15:54       ` Greg Kroah-Hartman [this message]
2016-05-03  7:51   ` Johan Hovold

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=20160502155448.GD15941@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tomeu.vizoso@collabora.com \
    /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.