From: Tejun Heo <tj@kernel.org>
To: Mark Knecht <markknecht@gmail.com>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: Drives missing at boot
Date: Wed, 07 Jul 2010 17:48:37 +0200 [thread overview]
Message-ID: <4C34A1D5.1090202@kernel.org> (raw)
In-Reply-To: <AANLkTik4zkcIyVxwtX8GA1BsQSZaAeODpPlY3mRVBc-4@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
Hello,
On 07/07/2010 05:34 PM, Mark Knecht wrote:
> OK - I don't know if this was you intention but since adding this
> patch I've not had a single drive missing failure. I've cold booted
> about 8 times and warm booted at least 20 times. Every one has come up
> fine. I've even gone so far as to turn off the UPS and sit for 5
> minutes before cold booting. Still nothing fails right now.
>
> I've had this sort of statistical thing happen before where it hasn't
> failed for days, maybe even weeks, but then it starts failing and
> fails every time for awhile. Over the past few days working with you
> I've never had to reboot more than twice to get you a file. Now I've
> tried 30 times this morning and I've come up with nothing.
>
> I will continue to watch the machine and send you the failing dmesg
> file whenever I finally get it. For now I can only attach the passing
> file showing the patch is now included.
It seems like SIDPR is a bit more unreliable than the current code can
handle and the added delay and read could have affected the result.
Eh... weird. Can you please apply the attached patch instead? The
only difference is it will print out two SControl values instead of
one. ie. "XXX SControl after resume = AAA BBB, tries=T". Can you
please try to boot multiple times and see if AAA and BBB differ
anytime? If that happens, please attach the boot log. Also, if you
see one with T > 1, please attach that one too.
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-07 15:48 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 17:56 Drives missing at boot Mark Knecht
2010-07-03 15:20 ` Mark Knecht
2010-07-03 16:01 ` Tejun Heo
2010-07-03 16:06 ` Mark Knecht
2010-07-03 16:13 ` Tejun Heo
2010-07-03 16:42 ` Mark Knecht
2010-07-05 6:30 ` Tejun Heo
2010-07-05 16:56 ` Mark Knecht
2010-07-06 6:33 ` Tejun Heo
2010-07-06 18:13 ` Mark Knecht
2010-07-07 5:50 ` Tejun Heo
2010-07-07 15:34 ` Mark Knecht
2010-07-07 15:48 ` Tejun Heo [this message]
2010-07-07 16:15 ` Mark Knecht
2010-07-07 16:19 ` Tejun Heo
2010-07-07 16:27 ` Mark Knecht
2010-07-07 17:06 ` Mark Knecht
2010-07-07 17:26 ` Tejun Heo
2010-07-07 17:32 ` Mark Knecht
2010-07-19 19:31 ` Mark Knecht
2010-07-19 21:01 ` Tejun Heo
2010-07-20 3:14 ` Paul Check
2010-07-20 14:14 ` Tejun Heo
2010-07-20 14:53 ` Mark Knecht
2010-07-20 16:16 ` Mark Knecht
2010-07-21 20:54 ` Mark Knecht
2010-07-21 21:22 ` Paul Check
2010-07-22 12:39 ` Tejun Heo
2010-08-02 22:07 ` Mark Knecht
2010-08-03 18:41 ` Randy Dunlap
2010-08-03 18:47 ` Mark Knecht
2010-08-03 18:55 ` Randy Dunlap
2010-08-04 16:16 ` Mark Knecht
2010-08-03 18:49 ` Jim Paris
2010-08-03 18:53 ` Mark Knecht
2010-07-20 20:52 ` Mark Knecht
2010-07-20 21:19 ` Paul Check
2010-07-20 21:26 ` Mark Knecht
2010-07-20 23:05 ` Paul Check
2010-07-03 18:56 ` Stan Hoeppner
2010-07-03 19:21 ` Mark Knecht
2010-07-03 19:42 ` Stan Hoeppner
2010-07-03 19:57 ` Mark Knecht
2010-07-03 22:31 ` Mark Knecht
2010-07-04 1:25 ` Thomas Fjellstrom
2010-07-05 6:19 ` Tejun Heo
2010-07-05 16:48 ` Mark Knecht
2010-07-05 23:59 ` Robert Hancock
2010-07-06 4:16 ` Mark Knecht
2010-07-06 6:13 ` Stan Hoeppner
2010-07-06 11:26 ` Sander
2010-07-06 6:32 ` Tejun Heo
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=4C34A1D5.1090202@kernel.org \
--to=tj@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markknecht@gmail.com \
/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