linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Bainbridge <chris.bainbridge@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI SBS: Fix intermittent hangs on Apple Macbook
Date: Wed, 29 Apr 2015 21:13:14 +0100	[thread overview]
Message-ID: <20150429201314.GA25904@localhost> (raw)
In-Reply-To: <4435249.leKkNHm9IZ@vostro.rjw.lan>

On Wed, Apr 29, 2015 at 02:37:57AM +0200, Rafael J. Wysocki wrote:
> On Friday, April 24, 2015 02:25:30 AM Chris Bainbridge wrote:
> > Commit 7bc5a2b exposed the SBS on Apple hardware, resulting in
> > intermittent hangs of several minutes on boot, and failure to detect or
> > report the battery. We fix this two ways:
> > 
> >  - SMBUS hang should not hang the whole system. Respect the specified
> >    timeout by busy waiting instead of sleeping.
> >    This fix is already used on MSI hardware.
> >  
> >  - Stop the SBS from hanging in the first place by introducing a 5us
> >    delay before each SMBUS transaction. This fix is the result of
> >    experimentation. This particular delay was found to completely fix
> >    the problem on an Ivybridge Macbook Pro 13. Hangs were observed with
> >    3us delay but never with 5us.
> > 
> > Also, pr_warn if SBS communication fails instead of silently ignoring.
> > 
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=94651
> > Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
> 
> Well, this looks like two patches combined to me.  Are the quirks actually
> related except that they are both needed to fix the problem?
> 

Not related, so should have been separate patches. One fixes the problem
of causing the SBS controller to stop responding, which results in a
hang.  The other fixes the problem of the resulting hang - but now I'm
thinking we don't need this, since it should never happen unless we hang
the SBS. I'll resend just the first fix as a new patch.

> 
> Do we really need this for all Apple hardware?
> 

Just MacBooks. I don't know which ones - the hang has been reported on:

    MacBookAir6,1 hsw 11" 2013
    MacBookPro10,2 ivb 13" 2012/2013
    MacBookPro11,1 hsw 15" 2013/2014

But it could affect earlier or later models too. The next patch will
limit this to MacBooks only - I have no way to narrow down the list of
affected hardware further, but since the fix only adds a 5us delay to
each SBS read it shouldn't cause any problems on unaffected hardware.

Thanks for the review.

  reply	other threads:[~2015-04-29 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24  1:25 [PATCH] ACPI SBS: Fix intermittent hangs on Apple Macbook Chris Bainbridge
2015-04-29  0:37 ` Rafael J. Wysocki
2015-04-29 20:13   ` Chris Bainbridge [this message]
2015-04-29 20:21   ` [PATCH] ACPI/sbshc: Add 5us delay to fix SBS hang on MacBook Chris Bainbridge
2015-04-30 22:15     ` Rafael J. Wysocki
2015-05-18  2:20     ` Brad Campbell
2015-05-18 12:27       ` Chris Bainbridge
2015-05-18 13:07         ` Chris Bainbridge

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=20150429201314.GA25904@localhost \
    --to=chris.bainbridge@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).