Bug 37632

Summary: Many ASUS laptops can't suspend with ehci_hcd loaded
Product: Drivers Reporter: Andrey Rahmatullin (wrar)
Component: USBAssignee: Jonathan Nieder (jrnieder)
Status: CLOSED CODE_FIX    
Severity: normal CC: b.brachaczek, boris.barbour, florian, jrnieder, vlastimil.zima
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.39 - 3.3-rc3 Subsystem:
Regression: No Bisected commit-id:
Attachments: lspci -vv
lsusb -v
dmesg
acpidump
dmesg

Description Andrey Rahmatullin 2011-06-16 11:28:26 UTC
Created attachment 62212 [details]
lspci -vv

Suspend to RAM or to disk hangs after "Spinning down sda". If unload ehci_hcd, it suspends and resumes properly. 
I've built the kernel with
CONFIG_PM_DEBUG=y
CONFIG_PM_VERBOSE=y
CONFIG_PM_ADVANCED_DEBUG=y
but didn't see anything interesting on suspend, but can provide a photo anyway.
Comment 1 Andrey Rahmatullin 2011-06-16 11:28:45 UTC
Created attachment 62222 [details]
lsusb -v
Comment 2 Jonathan Nieder 2012-02-13 02:36:32 UTC
Similar symptoms seem to affect many Asus laptops.  References:

 http://thread.gmane.org/gmane.linux.kernel/1222803
 http://bugs.debian.org/658778
Comment 3 Andrey Rahmatullin 2012-02-13 16:19:45 UTC
Btw it works for me in 3.3-rc3, I can check other kernels (and bisect, if that's needed).
Comment 4 Jonathan Nieder 2012-02-13 17:53:56 UTC
Odd. Maybe 10f6dc7eede9 (PCI: Rework ASPM disable code, 2011-11-10) did something.
Comment 5 Andrey Rahmatullin 2012-02-13 18:49:05 UTC
I've double-checked and found that ehci_hcd was unloaded. It still freezes on 3.3-rc3 without unloading ehci_hcd.
Comment 6 Greg Kroah-Hartman 2012-02-22 21:21:27 UTC
All USB bugs should be sent to the linux-usb@vger.kernel.org mailing 
list, and not entered into bugzilla.  Please bring this issue up there,
if it is still a problem in the latest kernel release.
Comment 7 Jonathan Nieder 2012-02-22 21:30:42 UTC
Hi Greg,

(In reply to comment #6)
> All USB bugs should be sent to the linux-usb@vger.kernel.org mailing 
> list,

I agree with this...

> and not entered into bugzilla.

... but not with this.  For this particular bug, which is widespread,
has already been discussed (http://thread.gmane.org/gmane.linux.kernel/1222803),
and does not seem to be understood well, I think it is worth keeping
track somewhere of the current status.  Therefore I'm taking ownership
of the bug.

> Please bring this issue up there,
> if it is still a problem in the latest kernel release.

For what it's worth, it's still a problem in 3.3-rc3 at least.

Thanks,
Jonathan
Comment 8 Jonathan Nieder 2012-03-01 15:19:25 UTC
Please attach full "dmesg" output from booting.
Comment 9 Boris Barbour 2012-03-03 10:07:14 UTC
Created attachment 72523 [details]
dmesg

Full "dmesg" output from booting and successfully hibernating/resuming
in the "platform" mode with USB drivers unloaded.
Comment 10 Boris Barbour 2012-03-03 10:08:49 UTC
Created attachment 72528 [details]
acpidump
Comment 11 Andrey Rahmatullin 2012-03-03 16:17:41 UTC
Created attachment 72534 [details]
dmesg
Comment 12 vlastimil.zima 2012-04-10 19:14:58 UTC
(In reply to comment #2)
> Similar symptoms seem to affect many Asus laptops.  References:
> 
>  http://thread.gmane.org/gmane.linux.kernel/1222803
>  http://bugs.debian.org/658778

I have same problem with my Toshiba Satellite Pro U400. Though I have not checked yet whether unloading ehci_hcd helps.
Comment 14 Jonathan Nieder 2012-05-04 09:14:32 UTC
A patch was merged in v3.4-rc5 which should fix this:

commit 151b61284776be2d6f02d48c23c3625678960b97
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Tue Apr 24 14:07:22 2012 -0400

    USB: EHCI: fix crash during suspend on ASUS computers
    
    This patch (as1545) fixes a problem affecting several ASUS computers:
    The machine crashes or corrupts memory when going into suspend if the
    ehci-hcd driver is bound to any controllers.  Users have been forced
    to unbind or unload ehci-hcd before putting their systems to sleep.
    
    After extensive testing, it was determined that the machines don't
    like going into suspend when any EHCI controllers are in the PCI D3
    power state.  Presumably this is a firmware bug, but there's nothing
    we can do about it except to avoid putting the controllers in D3
    during system sleep.
    
    The patch adds a new flag to indicate whether the problem is present,
    and avoids changing the controller's power state if the flag is set.
    Runtime suspend is unaffected; this matters only for system suspend.
    However as a side effect, the controller will not respond to remote
    wakeup requests while the system is asleep.  Hence USB wakeup is not
    functional -- but of course, this is already true in the current state
    of affairs.
    
    This fixes Bugzilla #42728.
    
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Tested-by: Steven Rostedt <rostedt@goodmis.org>
    Tested-by: Andrey Rahmatullin <wrar@wrar.name>
    Tested-by: Oleksij Rempel (fishor) <bug-track@fisher-privat.net>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Therefore closing, but confirmation either way about the fix would be
welcome.
Comment 15 Jonathan Nieder 2012-05-09 06:37:37 UTC
http://thread.gmane.org/gmane.linux.acpi.devel/52934
Comment 16 Florian Mickler 2012-07-25 19:38:29 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc7:

commit dbf0e4c7257f8d684ec1a3c919853464293de66e
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Mon Jul 9 11:09:21 2012 -0400

    PCI: EHCI: fix crash during suspend on ASUS computers