From: Tejun Heo <htejun@gmail.com>
To: Paul Collins <paul@burly.ondioline.org>
Cc: Jeff Garzik <jeff@garzik.org>, linux-kernel@vger.kernel.org
Subject: Re: ata2: SATA link down (SStatus 611 SControl 300)
Date: Tue, 15 Apr 2008 13:01:17 +0900 [thread overview]
Message-ID: <4804288D.5090504@gmail.com> (raw)
In-Reply-To: <87d4oryf4u.fsf@burly.wgtn.ondioline.org>
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
Paul Collins wrote:
> Tejun Heo <htejun@gmail.com> writes:
>
>> Can you please do the followings?
>>
>> 1. With the previous patch applied, do cold reboot. Power off the
>> machine. If possible turn off the master switch on the power
>> supply. What ten secs. Boot and see if anything is different.
>
> No difference observed.
>
>> 2. If that doesn't make any difference, with the previous patch backed
>> out (patch -R -p1) and the new patch attached here applied, do cold
>> boot and post the log.
Thanks for testing.
> ata2: XXX about to resume
> ata2: SATA link down (SStatus 611 SControl 0)
The link is already in slumber mode before the driver doing anything to
it. Is there any related setting in BIOS?
Also, can you please give a shot at the attached patch?
--
tejun
[-- Attachment #2: ata_piix-debug-2.patch --]
[-- Type: text/x-patch, Size: 2271 bytes --]
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index fae8404..4bca85d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1161,9 +1161,12 @@ static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val)
return -EINVAL;
piix_sidpr_write(&ap->link.device[0], reg, val);
+ ata_port_printk(ap, KERN_INFO, "XXX SCR WRITE master %d:%x\n", reg, val);
- if (ap->flags & ATA_FLAG_SLAVE_POSS)
+ if (ap->flags & ATA_FLAG_SLAVE_POSS) {
piix_sidpr_write(&ap->link.device[1], reg, val);
+ ata_port_printk(ap, KERN_INFO, "XXX SCR WRITE slave %d:%x\n", reg, val);
+ }
return 0;
}
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index be95fdb..0350bec 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3966,7 +3966,13 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline)
/* if SATA, resume link */
if (ap->flags & ATA_FLAG_SATA) {
+ ata_link_printk(link, KERN_INFO, "XXX about to resume\n");
+ sata_print_link_status(link);
rc = sata_link_resume(link, timing, deadline);
+ ata_link_printk(link, KERN_INFO, "XXX after resume\n");
+ sata_print_link_status(link);
+ ssleep(1);
+ sata_print_link_status(link);
/* whine about phy resume failure but proceed */
if (rc && rc != -EOPNOTSUPP)
ata_link_printk(link, KERN_WARNING, "failed to resume "
@@ -7172,7 +7178,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
ehi->probe_mask =
(1 << ata_link_max_devices(&ap->link)) - 1;
ehi->action |= ATA_EH_SOFTRESET;
- 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;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index a583032..6514157 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2191,6 +2191,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
}
/* prereset() might have modified ehc->i.action */
+ ehc->i.action |= ATA_EH_HARDRESET;
if (ehc->i.action & ATA_EH_HARDRESET)
reset = hardreset;
else if (ehc->i.action & ATA_EH_SOFTRESET)
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
next prev parent reply other threads:[~2008-04-15 4:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 21:48 ata2: SATA link down (SStatus 611 SControl 300) Paul Collins
2008-04-15 1:53 ` Tejun Heo
2008-04-15 2:30 ` Paul Collins
2008-04-15 2:57 ` Tejun Heo
2008-04-15 3:24 ` Paul Collins
2008-04-15 4:01 ` Tejun Heo [this message]
2008-04-15 21:12 ` Paul Collins
2008-04-15 22:26 ` Tejun Heo
2008-04-15 22:43 ` Paul Collins
2008-04-16 0:15 ` Tejun Heo
2008-04-16 0:33 ` Tejun Heo
2008-04-16 1:06 ` Paul Collins
2008-04-16 1:27 ` [PATCH #upstream-fixes] libata: force hardreset if the link is in powersave mode 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=4804288D.5090504@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@burly.ondioline.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