All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Andrew Henry <adhenry@bredband.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: 2.6.25: sata_sil freezes, hard resets port.
Date: Thu, 12 Jun 2008 10:46:14 +0900	[thread overview]
Message-ID: <48507FE6.5010009@gmail.com> (raw)
In-Reply-To: <48501C89.2040402@bredband.net>

[-- Attachment #1: Type: text/plain, Size: 3295 bytes --]

Andrew Henry wrote:
> Tejun Heo wrote:
>>   Can you please
>> post the outputs of dmesg after the wake up failure (fdisk -l) and
>> "hdparm --Istdout /dev/sdX"?
>>   
> Yepp.  Here is the hdparm result (identical for both drives), followed
> by the full dmesg output from boot until one of the drives starts
> failing and then all the messages that come for a while after failure.
> By the way, these are not the latest 'green' drives by Western Digital
> that you hinted at.  They are one generation below the green drives, but
> maybe they do have an updated standby feature.

I see.  Those green drives do strange things with advanced power
management feature and end up drastically reduce the lifetime.  I
wouldn't be too surprised to see its predecessor doing weird things.

> [root@k2 Desktop]# hdparm --Istdout /dev/sdb
> 0040 3fff c837 0010 0000 0000 003f 0000
> 0000 0000 2020 2020 2057 442d 5743 4153
> 5530 3230 3638 3733 0000 0000 0000 3031
> 2e30 3142 3031 5744 204d 7920 426f 6f6b
> 2020 2020 2020 2020 2020 2020 2020 2020
> 2020 2020 2020 2020 2020 2020 2020 8001
> 0000 0b00 4001 0000 0000 0007 3fff 0010
> 003f fc10 00fb 0100 ffff 0fff 0000 0007
> 0003 0078 0078 0078 0078 0000 0000 0000
> 0000 0000 0000 0000 0106 0000 0000 0000
> 0070 001c 0029 7400 4002 0029 3400 4002
> 207f 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 6030 3a38 0000 0000
> 0000 0000 4000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 ab12 8004 c000 0001 0002 0001 0001
> 0000 0002 0000 0000 0000 0000 0001 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0001 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000

Hmmm.. it's not setting any serial ata features including DIPM.  The
drive shouldn't put the link into powersave mode.

> ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
> ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
>          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
> ata2.00: status: { DRDY }
> ata2: port is slow to respond, please be patient (Status 0xd8)
> ata2: device not ready (errno=-16), forcing hardreset
> ata2: hard resetting link
> ata2: port is slow to respond, please be patient (Status 0xff)
> ata2: COMRESET failed (errno=-16)
> ata2: hard resetting link
> ata2: port is slow to respond, please be patient (Status 0xff)
> ata2: COMRESET failed (errno=-16)
> ata2: hard resetting link
> ata2: port is slow to respond, please be patient (Status 0xff)
> ata2: COMRESET failed (errno=-16)
> ata2: hard resetting link
> ata2: COMRESET failed (errno=-16)
> ata2: reset failed, giving up
> ata2.00: disabled

Hmmm... it never sends the first D2H FIS.  Can you please test the
attached patch and report the kernel log after failure?

Thanks.

-- 
tejun

[-- Attachment #2: wd.debug --]
[-- Type: text/plain, Size: 847 bytes --]

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 927b692..97493b8 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3477,7 +3477,7 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params,
 	if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
 		return rc;
 
-	scontrol = (scontrol & 0x0f0) | 0x300;
+	scontrol = (scontrol & 0x0f0)/* | 0x300*/;
 
 	if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
 		return rc;
@@ -3532,6 +3532,10 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline)
 	const unsigned long *timing = sata_ehc_deb_timing(ehc);
 	int rc;
 
+	/* print link status */
+	printk("PRERESET: ");
+	sata_print_link_status(link);
+
 	/* if we're about to do hardreset, nothing more to do */
 	if (ehc->i.action & ATA_EH_HARDRESET)
 		return 0;

  reply	other threads:[~2008-06-12  1:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04 19:58 2.6.25: sata_sil freezes, hard resets port Andrew Henry
2008-06-10  3:18 ` Tejun Heo
2008-06-11 18:42   ` Andrew Henry
2008-06-12  1:46     ` Tejun Heo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-13  9:50 Henry, Andrew
2008-09-10 13:23 Henry, Andrew
2008-09-29  2:59 ` Tejun Heo
2008-05-30 18:25 Andrew Henry
2008-05-30  8:26 Andrew Henry
2008-05-29 15:01 Henry, Andrew
2008-05-30  5:15 ` 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=48507FE6.5010009@gmail.com \
    --to=htejun@gmail.com \
    --cc=adhenry@bredband.net \
    --cc=linux-ide@vger.kernel.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 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.