From: Tejun Heo <tj@kernel.org>
To: Paul Check <paul@thechecks.ca>
Cc: linux-ide@vger.kernel.org
Subject: Re: Intermittent SATA link down SStatus 0
Date: Wed, 14 Jul 2010 14:26:39 +0200 [thread overview]
Message-ID: <4C3DACFF.2060504@kernel.org> (raw)
In-Reply-To: <8276efbfebcbfc3e58033ab8d5996d9d.squirrel@thechecks.ca>
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]
Hello,
On 07/12/2010 06:36 PM, Paul Check wrote:
>> Tejun & Co:
>>
>> I have finally upgraded to the 2.6.34 kernel, and I am still having
>> problems with some of my drives not coming up some of the time (different
>> drives, at different times, never more than one).
>>
>> Here are some lines from /var/log/messages on the most recent boot below.
>> Do you have any suggestions for this? I'm getting tired of having to
>> reconstitute my raid 30-50% of the time, and will try anything to see if
>> it fixes. Note the "link up (unknown)" and "link down" lines. I don't know
>> what should appear, but I have 4 hard drives and one optical drive plugged
>> into 5 of the 6 SATA ports on the board.
...
>> Jul 12 12:25:22 min kernel: [ 2.078489] ata2.01: SATA link up <unknown>
>> (SStatus 300 SControl 123)
Hmm, yeah, it seems like SCR access via SIDPR is more flaky than
covered by the previous commit. There's another thread where similar
problem is being debugged. Can you please do the following? I'm
attaching patch here too.
http://thread.gmane.org/gmane.linux.kernel/1005983/focus=46749
Thanks.
--
tejun
[-- Attachment #2: resume-dbg-1.patch --]
[-- Type: text/x-patch, Size: 1365 bytes --]
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2984e45..ce87bfe 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3712,7 +3712,7 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
unsigned long deadline)
{
int tries = ATA_LINK_RESUME_TRIES;
- u32 scontrol, serror;
+ u32 scontrol, scontrol1, serror;
int rc;
if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
@@ -3739,6 +3739,14 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
return rc;
} while ((scontrol & 0xf0f) != 0x300 && --tries);
+ /* check once more */
+ msleep(100);
+ if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol1)))
+ return rc;
+ ata_link_printk(link, KERN_ERR,
+ "XXX SControl after resume = %X %X, tries=%d\n",
+ scontrol, scontrol1, ATA_LINK_RESUME_TRIES - tries + 1);
+
if ((scontrol & 0xf0f) != 0x300) {
ata_link_printk(link, KERN_ERR,
"failed to resume link (SControl %X)\n",
@@ -6007,7 +6015,7 @@ static void async_port_probe(void *data, async_cookie_t cookie)
ehi->probe_mask |= ATA_ALL_DEVICES;
ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
- ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
+ ehi->flags |= ATA_EHI_NO_AUTOPSY/* | ATA_EHI_QUIET*/;
ap->pflags &= ~ATA_PFLAG_INITIALIZING;
ap->pflags |= ATA_PFLAG_LOADING;
next prev parent reply other threads:[~2010-07-14 12:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 15:57 Intermittent SATA link down SStatus 0 Paul Check
2010-01-21 16:28 ` Paul Check
2010-01-21 16:35 ` Paul Check
2010-01-21 16:49 ` Jeff Garzik
2010-01-21 16:55 ` Paul Check
2010-01-21 17:11 ` Alan Cox
2010-01-21 17:24 ` Paul Check
2010-01-21 17:36 ` Paul Check
2010-01-21 19:24 ` Paul Check
2010-01-21 21:08 ` Paul Check
2010-01-25 5:06 ` Tejun Heo
2010-02-05 3:29 ` Tim
2010-02-09 5:32 ` Paul Check
2010-07-12 16:32 ` Paul Check
2010-07-12 16:36 ` Paul Check
2010-07-14 12:26 ` Tejun Heo [this message]
2010-07-14 17:58 ` Paul Check
2010-07-14 23:36 ` Tejun Heo
2010-07-15 0:43 ` Paul Check
2010-07-15 9:20 ` Tejun Heo
2010-07-15 9:29 ` Tejun Heo
2010-07-15 17:06 ` Paul Check
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=4C3DACFF.2060504@kernel.org \
--to=tj@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=paul@thechecks.ca \
/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).