Re: xhci driver, suspend/resume on Lenovo U300

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

 



Hi Alan,

I noticed your commit to fix S3 hangs on ASUS machines with an EHCI host
controller:

> >commit 151b61284776be2d6f02d48c23c3625678960b97
> >Author: Alan Stern<stern@xxxxxxxxxxxxxxxxxxx>
> >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@xxxxxxxxxxxxxxxxxxx>
> >     Tested-by: Steven Rostedt<rostedt@xxxxxxxxxxx>
> >     Tested-by: Andrey Rahmatullin<wrar@xxxxxxxxx>
> >     Tested-by: Oleksij Rempel (fishor)<bug-track@xxxxxxxxxxxxxxxxx>
> >     Cc: stable<stable@xxxxxxxxxxxxxxx>
> >     Signed-off-by: Greg Kroah-Hartman<gregkh@xxxxxxxxxxxxxxxxxxx>

I've seen a whole bunch of users complaining about what look like
similar issues.  Most of them come across this blog post and use the
script to unbind both the EHCI and xHCI drivers:

http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug

I'm wondering if several other computer brands are effected by a similar
buggy BIOS/firmware.  It's hard to tell, since unbinding the drivers can
paper over many different kinds of symptoms.

Colin is working with someone who is running Ubuntu on a Lenovo U300s,
who also sees a hang on suspend.  The user said installing the script to
unbind both the EHCI and xHCI drivers fixed the suspend hang.  The bug
report is here:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/904261

At this point, we actually don't know if xHCI or EHCI is to blame, since
the script unbinds both drivers.  I didn't think about that fact when I
was trying various fixes (all of which didn't work).

Colin, could you have the user unbind the EHCI driver only, attempt to
suspend, and see if they can suspend and resume successfully?  Then
reboot, unbind the xHCI driver only, and see if suspend works?

If just unbinding the EHCI driver helps, then you should roll an Ubuntu
kernel with Alan's patch and see if suspend just works with the patch.

Alan, do you remember if any of the ASUS machines that were effected by
this bug also had xHCI?  I'm wondering if the buggy firmware needs both
host controllers in D0 on suspend, or just the EHCI host controller.

If it needs both hosts, then I need to make a similar patch for the xHCI
driver.  However, most of the laptops include the NEC host controller
chip, and not all the laptops with an NEC host have this buggy suspend
behavior.  So maybe we would have to key off BIOS names?

Alan, do you know what BIOS vendor/version the ASUS machine that had
this issue was running?

Sarah Sharp

On Fri, Apr 27, 2012 at 08:53:15AM +0100, Colin Ian King wrote:
> Sarah,
> 
> this does sound promising, thanks for spotting this, and I look
> forward to spinning a test kernel and getting it tested once the
> patch is available.
> 
> Thanks!
> 
> Colin
> 
> On 26/04/12 21:21, Sarah Sharp wrote:
> >On Fri, Apr 20, 2012 at 06:31:52PM +0100, Colin Ian King wrote:
> >>On 18/04/12 21:35, Sarah Sharp wrote:
> >>>There was one bug that was fixed last week that could (I suppose)
> >>>potentially have impacted the BIOS.  There was a bit in the OS/BIOS
> >>>handoff register that should have been preserved, but wasn't being
> >>>preserved by software.
> >>>
> >>>Could they try with greg's usb-linus branch?
> >>>
> >>>http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git
> >>>
> >>
> >>Hi again Sarah,
> >>
> >>the user has now given this a spin with no positive results :-(
> >
> >Hi Colin,
> >
> >This starts to sound awfully like the problem this commit fixes:
> >
> >commit 151b61284776be2d6f02d48c23c3625678960b97
> >Author: Alan Stern<stern@xxxxxxxxxxxxxxxxxxx>
> >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@xxxxxxxxxxxxxxxxxxx>
> >     Tested-by: Steven Rostedt<rostedt@xxxxxxxxxxx>
> >     Tested-by: Andrey Rahmatullin<wrar@xxxxxxxxx>
> >     Tested-by: Oleksij Rempel (fishor)<bug-track@xxxxxxxxxxxxxxxxx>
> >     Cc: stable<stable@xxxxxxxxxxxxxxx>
> >     Signed-off-by: Greg Kroah-Hartman<gregkh@xxxxxxxxxxxxxxxxxxx>
> >
> >
> >I'll look into whether we can also apply this patch to xHCI, and
> >hopefully your user can test it.
> >
> >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