From: Jens Axboe <jaxboe@fusionio.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tejun Heo <tj@kernel.org>,
"jgarzik@pobox.com" <jgarzik@pobox.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode
Date: Sun, 18 Jul 2010 14:34:46 -0600 [thread overview]
Message-ID: <4C436566.8060609@fusionio.com> (raw)
In-Reply-To: <20100718184243.GA4062@srcf.ucam.org>
On 07/18/2010 12:42 PM, Matthew Garrett wrote:
> On Sun, Jul 18, 2010 at 10:03:44AM -0600, Jens Axboe wrote:
>
>> So while the below works, it doesn't work when the laptop is
>> coming out of suspend. I can't seem to find out why, since it's
>> a bit hard to debug when you are on the road. What happens is
>> that it comes back with a bit of a delay, and then the disks are
>> apparently gone. I've tried adding a resume quirk to re-AHCI the
>> thing, but it doesn't help.
>
> You'll certainly need to re-quirk on resume, since there's no guarantee
> that the firmware will do it for you. My suspicion is that it comes up
> in PATA mode with legacy firmware in order to improve compatibility with
> XP, and you'd have ahci if you booted through EFI. I don't have
> something handy to test that right now, though.
See this is where I'm getting confused, since I'm not entirely sure what
the boot process is. If I boot a DVD directly, then it's in piix mode.
Booting through refit -> Linux, it's in piix mode. So my logic was that
it is probably getting switched into ahci mode by the OSX boot loader or
perhaps the driver does it there.
The resume re-quirk makes no difference, so it's likely that it needs a
bit more love when it's coming out of that state.
>> Looking at the specs, I don't see what I am missing to make this
>> work for resume. I'm assuming that EFI did initialize some bits
>> that am missing when coming out of resume, but I don't know which
>> bits.
>
> There's no guarantee that the AHCI BAR is programmed by the firmware (it
> seems to be on the Macs, but won't be on most hardware). Is it getting
> reprogrammed on resume?
The BARs are fine with just the patch I sent:
Region 0: I/O ports at 3128 [size=8]
Region 1: I/O ports at 313c [size=4]
Region 2: I/O ports at 0170 [size=8]
Region 3: I/O ports at 0374 [size=1]
Region 4: I/O ports at 3020 [size=32]
Region 5: Memory at a2800000 (32-bit, non-prefetchable) [size=2K]
Since everything is screwed on resume and all file systems are gone,
there's no easy way for me to printk() and verify anything on resume. So
unless anyone has any stellar ideas on what to try, I guess it'll have
to wait until I can log some output somehow.
--
Jens Axboe
next prev parent reply other threads:[~2010-07-18 20:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-18 16:03 [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode Jens Axboe
2010-07-18 18:42 ` Matthew Garrett
2010-07-18 20:34 ` Jens Axboe [this message]
2010-07-18 21:32 ` Tino Keitel
2010-07-19 5:40 ` Tino Keitel
2010-07-19 15:49 ` Jens Axboe
2010-07-19 15:53 ` Tino Keitel
2010-07-19 15:55 ` Jens Axboe
2010-07-19 17:23 ` Mike Snitzer
2010-07-19 20:40 ` Jens Axboe
2010-07-18 22:44 ` Jeff Garzik
2010-07-19 0:25 ` Jens Axboe
2010-07-19 10:13 ` Tejun Heo
2010-07-19 15:58 ` Matthew Garrett
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=4C436566.8060609@fusionio.com \
--to=jaxboe@fusionio.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=tj@kernel.org \
/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