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 11:57:58 +0900 [thread overview]
Message-ID: <480419B6.1050309@gmail.com> (raw)
In-Reply-To: <87hce3yhmi.fsf@burly.wgtn.ondioline.org>
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
Paul Collins wrote:
> Tejun Heo <htejun@gmail.com> writes:
>
>> That's very strange. The link is in slumber powersave mode. I wonder
>> how it got there. Can you please try the attached patch and report
>> resulting boot log?
> ata2: XXX SCR WRITE master 2:300
> ata2: XXX SCR WRITE slave 2:300
This is the only write to the SCR control reg and the driver is
*inhibiting* transition to either powersave mode.
> ata2: soft resetting link
> ata2: SATA link down (SStatus 611 SControl 300)
Yet, the device is in slumber ps mode.
> ata2: XXX SCR WRITE master 1:4050000
> ata2: XXX SCR WRITE slave 1:4050000
This is to clear SCR status.
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.
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.
--
tejun
[-- Attachment #2: ata_piix-debug-1.patch --]
[-- Type: text/x-patch, Size: 1839 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/sata_svw.c b/drivers/ata/sata_svw.c
next prev parent reply other threads:[~2008-04-15 2:58 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 [this message]
2008-04-15 3:24 ` Paul Collins
2008-04-15 4:01 ` Tejun Heo
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=480419B6.1050309@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