From: Tejun Heo <tj@kernel.org>
To: Olof Johansson <olof@lixom.net>
Cc: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: link resets with SSD on AHCI
Date: Wed, 05 May 2010 12:15:06 +0200 [thread overview]
Message-ID: <4BE1452A.6040607@kernel.org> (raw)
In-Reply-To: <20100429215935.GA9796@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
Hello,
On 04/29/2010 11:59 PM, Olof Johansson wrote:
> I did notice that ALPM is enabled at boot, and doesn't seem to be
> re-enabled after the error reset. Based on this, I experimented with
> disabling it (just returning -EINVAL in ahci_enable_alpm). That did make
> the problem not happen after a significant test run (overnight vs 4.5
> minutes above).
It could be that libata's ALPM enable sequence isn't liked by the
controller. libata first resets the link disabling all powersave
transitions, then turn on ALPM then allows powersave transitions.
It's possible that the controller or device somehow gets upset by this
(ie. the device is told to go to powersave mode only to find out that
the host side isn't allowing it).
Does the attached patch make any difference? Can you please post the
kernel boot log with the patch applied?
Thanks.
--
tejun
[-- Attachment #2: dont-inhibit-ps-on-reset.patch --]
[-- Type: text/x-patch, Size: 948 bytes --]
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 49cffb6..696be5f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3810,7 +3810,7 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
* cleared.
*/
do {
- scontrol = (scontrol & 0x0f0) | 0x300;
+ scontrol = (scontrol & 0x0f0)/* | 0x300*/;
if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
return rc;
/*
@@ -3823,9 +3823,9 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
/* is SControl restored correctly? */
if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
return rc;
- } while ((scontrol & 0xf0f) != 0x300 && --tries);
+ } while ((scontrol & 0xf0f) != /*0x300*/0 && --tries);
- if ((scontrol & 0xf0f) != 0x300) {
+ if ((scontrol & 0xf0f) != /*0x300*/0) {
ata_link_printk(link, KERN_ERR,
"failed to resume link (SControl %X)\n",
scontrol);
next prev parent reply other threads:[~2010-05-05 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 21:59 link resets with SSD on AHCI Olof Johansson
2010-05-05 10:15 ` Tejun Heo [this message]
2010-05-12 18:49 ` Olof Johansson
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=4BE1452A.6040607@kernel.org \
--to=tj@kernel.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=olof@lixom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.