From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] ahci: implement ata_save/restore_initial_config()
Date: Tue, 17 Apr 2007 10:35:23 -0400 [thread overview]
Message-ID: <4624DB2B.3030003@garzik.org> (raw)
In-Reply-To: <20070318131533.GC6152@htj.dyndns.org>
Tejun Heo wrote:
> There are several registers which describe how the controller is
> configured. These registers are sometimes implemented as r/w
> registers which are configured by firmware and get cleared on
> controller reset or after suspend/resume cycle. ahci saved and
> restored those values inside ahci_reset_controller() which is a bit
> messy and doesn't work over suspend/resume cycle.
>
> This patch implements ahci_save/restore_initial_config(). The save
> function is called during driver initialization and saves cap and
> port_map to hpriv. The restore function is called after the
> controller is reset to restore the initial values.
>
> Sometimes the initial firmware values are inconsistent and need to be
> fixed up. This is handled by ahci_save_initial_config(). For this,
> there are two versions of saved registers. One to write back to the
> hardware register, the other to use during driver operation. This is
> necessary to keep ahci's behavior unchanged (write back fixed up
> port_map while keeping cap as-is).
>
> This patch makes ahci save the register values once before the first
> controller reset, not after it's been reset. Also, the same stored
> values are used written back after each reset, so the register values
> are properly recovered after suspend/resume cycle.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> Jeff, this is the save/restore separation patch as suggested.
applied 1-2
prev parent reply other threads:[~2007-04-17 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-18 13:15 [PATCH 1/2] ahci: implement ata_save/restore_initial_config() Tejun Heo
2007-03-18 13:26 ` [PATCH 2/2] ahci: move port_map handling to ahci_save_initial_config() Tejun Heo
2007-04-17 14:35 ` Jeff Garzik [this message]
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=4624DB2B.3030003@garzik.org \
--to=jeff@garzik.org \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.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;
as well as URLs for NNTP newsgroup(s).