Re: xHCI not waking up after S3 Resume on Ivybridge

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

 



On Wed, Mar 14, 2012 at 09:52:28AM -0400, Tom Goetz wrote:
> 
> On Mar 13, 2012, at 5:18 PM, Sarah Sharp wrote:
> 
> > Hi Tom,
> > 
> > I'm the driver xHCI maintainer, and it helps if you Cc me on mail about
> > USB 3.0.  Otherwise it gets lost in the noise. :)
> 
> Thanks for the reply Sarah.
> 
> > 
> > On Mon, Mar 12, 2012 at 01:23:41PM +0000, Tom Goetz wrote:
> >> I have two machines where the Intel xHCI devices don't wake up from runtime
> >> suspend after a S3 suspend/resume on Xen 4.0.3 and Linux 3.2.9.
> > 
> > So the system wakes up from S3, but the host doesn't report any port
> > status changes when you plug in a USB device?
> 
> I've narrowed it down farther since then. Anytime you set the runtime power mode to "auto" and let the device go into D3 after a S3 resume, plugging in a device will not wake the xHCI HCD driver. Here's a trace of the path that wakes the device in the good case, but fails to happen in bad case:

Ok, I'll see if I can reproduce that on my Ivy Bridge system with 3.2.9.
It's likely that what happened is that a port status change bit didn't
get cleared after the S3 resume, and the hardware won't give us any more
interrupts until that bit gets cleared.  Let me see if I can whip up a
patch.

> >> and after resuming on battery, inserting a
> >> usb device into a port no longer wakes up the xHCI device. Changing the power
> >> mode from "auto" to "on" fixes it. It is not broken on Ubuntu 12.04 Beta 1 with
> >> Linux 3.2.0.
> > 
> > Interesting.  I've been receiving several reports about suspend
> > failures, but none this specific about the kernel version.  Thanks for
> > the clue.
> > 
> > Do you see messages about root hub power loss after resume on battery,
> > like these?
> > 
> > [  776.123716] xhci_hcd 0000:00:14.0: setting latency timer to 64
> > [  776.123727] usb usb3: root hub lost power or was reset
> > [  776.123729] usb usb4: root hub lost power or was reset
> 
> I'm not seeing these.

Ok, thanks.

> > I'm wondering if the host controller is reacting differently based on
> > whether the laptop is powered off of AC or not.  Oliver noted some bugs
> > in the S4 power loss resume path, so those might be related.
> 
> What I'm seeing is it doesn't matter what power state your in when you suspend. Battery also only matters for resume in that it causes runtime power management to be allowed for the xHCI device. If you resume in AC, but set the power control for the device to "auto", you will see the same problem.
> 
> > 
> >> I have also have a Intel SDP desktop where setting the power mode to "auto" on
> >> the xHCI device does not break device insertion enabling the device on a fresh
> >> boot, but does break it after a S3 resume.
> >> 
> >> I have an instrumented kernel and see no rpm_resume for this device int he bad
> >> case. Wake up works fine  for devices plugged into EHCI.
> >> 
> >> I've also posted this to xen-devel earlier:
> >> http://lists.xen.org/archives/html/xen-devel/2012-03/msg00727.html
> > 
> > Why were you posting there in particular?  You're much more likely to
> > get your USB questions answered on this mailing list. :)
> 
> I'm concerned that this may be a bug in the Xen PVOPs MSI code. To that end I've posted updates on xen-devel here:
> 
> http://lists.xen.org/archives/html/xen-devel/2012-03/msg00904.html
> http://lists.xen.org/archives/html/xen-devel/2012-03/msg00727.html
> http://lists.xen.org/archives/html/xen-devel/2012-03/msg00978.html

Does the xHCI host work fine without Xen?  I.e. running Linux directly
as the host OS, suspending, resuming, and then plugging in a device?

> The con to that theory is that EHCI is also a MSI and works.

Are you sure EHCI is using MSI?  ISTR that it's using legacy PCI IRQs...

Sarah Sharp
--
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