From: Pavel Machek <pavel@ucw.cz>
To: John Fremlin <not@just.any.name>
Cc: kernel list <linux-kernel@vger.kernel.org>,
htejun@gmail.com, jim.kardach@intel.com, ak@suse.de
Subject: AHCI power saving (was Re: Ten hours on X60s)
Date: Mon, 13 Nov 2006 15:22:19 +0100 [thread overview]
Message-ID: <20061113142219.GA2703@elf.ucw.cz> (raw)
In-Reply-To: <87hcx3adcd.fsf-genuine-vii@john.fremlin.org>
Hi!
> There are a couple of bits for turning on the hardware's
> power-saving. It makes me think it might save me about a watt, but the
> effect could be entirely psychological.
No, I did not mean _those_ bits. This made little or difference for
me... (100mW or so, definitely not watt).
doing ahci_pci_device_{suspend,resume} should definitely do the trick,
and ahci_{start,stop}_engine might be enough.
> Here is the patch. It is not correct and ready for general use,
> because you are supposed to check whether the AHCI chipset supports
> the feature.
> So there is no example code for sending the AHCI chipset to S3 and
> bringing it back? I thought you said there was before, but I can't
> find it!
ahci_pci_device_{suspend,resume} seems to be the code...
Here's the port of your patch to recent -git.
Pavel
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index cef2e70..82a8a44 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -148,6 +148,8 @@ enum {
PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
/* PORT_CMD bits */
+ PORT_CMD_ALPE = (1 << 27), /* Aggressive Link Power Management Enable */
+ PORT_CMD_ASP = (1 << 26), /* Aggressive entrance to Slumber or Partial power management states */
PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */
PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */
PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */
@@ -486,7 +488,7 @@ static void ahci_power_up(void __iomem *
}
/* wake up link */
- writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
+ writel(cmd | PORT_CMD_ICC_ACTIVE | PORT_CMD_ALPE | PORT_CMD_ASP, port_mmio + PORT_CMD);
}
static void ahci_power_down(void __iomem *port_mmio, u32 cap)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next parent reply other threads:[~2006-11-13 15:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87k639u55l.fsf-genuine-vii@john.fremlin.org>
[not found] ` <20061009215221.GC30702@elf.ucw.cz>
[not found] ` <87ods6loe8.fsf-genuine-vii@john.fremlin.org>
[not found] ` <20061025070920.GG5851@elf.ucw.cz>
[not found] ` <87y7r3xlif.fsf-genuine-vii@john.fremlin.org>
[not found] ` <20061026204655.GA1767@elf.ucw.cz>
[not found] ` <87slgv6ccz.fsf-genuine-vii@john.fremlin.org>
[not found] ` <20061112183614.GA5081@ucw.cz>
[not found] ` <87hcx3adcd.fsf-genuine-vii@john.fremlin.org>
2006-11-13 14:22 ` Pavel Machek [this message]
2006-11-13 15:32 ` Jeff Garzik
2006-11-13 15:37 ` Andi Kleen
2006-11-13 15:48 ` Jeff Garzik
2006-11-13 16:08 ` Valdis.Kletnieks
2006-11-13 17:58 ` Mark Lord
2006-11-13 22:01 ` Pavel Machek
2006-11-14 3:43 ` HD head unloads (was: Re: AHCI power saving) Henrique de Moraes Holschuh
2006-11-14 9:30 ` Jan Engelhardt
2006-11-14 18:06 ` HD head unloads Mark Lord
2006-11-15 10:58 ` Jan Engelhardt
2006-11-16 0:02 ` Jan Engelhardt
2006-11-21 4:40 ` AHCI power saving (was Re: Ten hours on X60s) Tejun Heo
2006-11-21 11:32 ` Pavel Machek
2006-11-13 16:11 ` Alan
2006-11-13 21:56 ` Pavel Machek
2006-11-14 13:33 ` AHCI power saving John Fremlin
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=20061113142219.GA2703@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=ak@suse.de \
--cc=htejun@gmail.com \
--cc=jim.kardach@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=not@just.any.name \
/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
all inboxes | Powered by JetHome®