linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Evgeni Golov <sargentd@die-welt.net>
Cc: Elias Oltmanns <eo@nebensachen.de>, Mark Lord <liml@rtr.ca>,
	linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Odd behaviour of device in response to idleimmediate with unload
Date: Fri, 21 Nov 2008 15:41:22 +0900	[thread overview]
Message-ID: <49265812.3050902@kernel.org> (raw)
In-Reply-To: <20081118073749.D84FD1FD6E@chi.die-welt.net>

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

Evgeni Golov wrote:
> On Tue, 18 Nov 2008 10:22:25 +0900 Tejun Heo wrote:
> 
>> Can you please attach lspci -nn result and full boot log?
> 
> Done :)

Something strange is going on there.  Can you please apply the attached
patch and post resulting kernel log?

Thanks.

-- 
tejun

[-- Attachment #2: ahci-debug.patch --]
[-- Type: text/x-patch, Size: 2604 bytes --]

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a67b8e7..8500fd5 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2006,6 +2006,8 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
 	}
 
 	if (irq_stat & (PORT_IRQ_CONNECT | PORT_IRQ_PHYRDY)) {
+		ata_port_printk(ap, KERN_INFO, "XXX PHY event 0x%x\n",
+				irq_stat);
 		ata_ehi_hotplugged(host_ehi);
 		ata_ehi_push_desc(host_ehi, "%s",
 			irq_stat & PORT_IRQ_CONNECT ?
@@ -2044,6 +2046,7 @@ static void ahci_port_intr(struct ata_port *ap)
  	 */
 	if ((hpriv->flags & AHCI_HFLAG_NO_HOTPLUG) &&
 		(status & PORT_IRQ_PHYRDY)) {
+		ata_port_printk(ap, KERN_INFO, "XXX PHY event clearing 0x%x\n", status);
 		status &= ~PORT_IRQ_PHYRDY;
 		ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
 	}
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 32da9a9..24b52aa 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2380,13 +2380,15 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	/*
 	 * Perform reset
 	 */
-	if (ata_is_host_link(link))
+	if (ata_is_host_link(link)) {
+		ata_port_printk(ap, KERN_INFO, "XXX FREEZING\n");
 		ata_eh_freeze_port(ap);
+	}
 
 	deadline = ata_deadline(jiffies, ata_eh_reset_timeouts[try++]);
 
 	if (reset) {
-		if (verbose)
+		//if (verbose)
 			ata_link_printk(link, KERN_INFO, "%s resetting link\n",
 					reset == softreset ? "soft" : "hard");
 
@@ -2440,6 +2442,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
 				goto fail;
 			}
 
+			ata_port_printk(ap, KERN_INFO, "XXX follow-up SRST\n");
 			ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
 			rc = ata_do_reset(link, reset, classes, deadline, true);
 		}
@@ -2479,8 +2482,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 		slave->sata_spd = (sstatus >> 4) & 0xf;
 
 	/* thaw the port */
-	if (ata_is_host_link(link))
+	if (ata_is_host_link(link)) {
+		ata_port_printk(ap, KERN_INFO, "XXX THAW\n");
 		ata_eh_thaw_port(ap);
+	}
 
 	/* postreset() should clear hardware SError.  Although SError
 	 * is cleared during link resume, clearing SError here is
@@ -2490,9 +2495,17 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	 * link onlineness and classification result later.
 	 */
 	if (postreset) {
+		ata_port_printk(ap, KERN_INFO, "XXX postreset start\n");
 		postreset(link, classes);
 		if (slave)
 			postreset(slave, classes);
+		{
+			u32 serror = 0;
+			sata_scr_read(link, SCR_ERROR, &serror);
+			ata_port_printk(ap, KERN_INFO,
+					"XXX postreset end, SError=0x%x\n",
+					serror);
+		}
 	}
 
 	/* clear cached SError */

  reply	other threads:[~2008-11-21  6:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 10:31 Odd behaviour of device in response to idleimmediate with unload Elias Oltmanns
2008-11-04 10:40 ` Tejun Heo
2008-11-04 12:32   ` Evgeni Golov
2008-11-04 17:06     ` Mark Lord
2008-11-04 17:18       ` Mark Lord
2008-11-04 17:47         ` Mark Lord
2008-11-04 18:13           ` Mark Lord
2008-11-04 18:54             ` Evgeni Golov
2008-11-04 19:39               ` Mark Lord
2008-11-05  9:32                 ` Tejun Heo
2008-11-05 13:47                   ` Elias Oltmanns
2008-11-05 14:08                     ` Tejun Heo
2008-11-05 18:55                       ` Elias Oltmanns
2008-11-06 11:23                         ` Evgeni Golov
2008-11-06 12:12                           ` Elias Oltmanns
2008-11-05 19:34                       ` Evgeni Golov
2008-11-06 11:41                       ` Elias Oltmanns
2008-11-07  4:08                         ` Tejun Heo
2008-11-07  7:48                           ` Evgeni Golov
2008-11-10  9:00                             ` Tejun Heo
2008-11-10 10:26                               ` Evgeni Golov
2008-11-10 11:35                                 ` Elias Oltmanns
2008-11-13 11:33                                   ` Evgeni Golov
2008-11-13 12:29                                     ` Elias Oltmanns
2008-11-16  9:39                                     ` Tejun Heo
2008-11-17  7:15                                       ` Evgeni Golov
2008-11-17  7:19                                         ` Tejun Heo
2008-11-17  7:48                                           ` Evgeni Golov
2008-11-18  1:22                                             ` Tejun Heo
2008-11-18  7:37                                               ` Evgeni Golov
2008-11-21  6:41                                                 ` Tejun Heo [this message]
2008-11-21 19:40                                                   ` Evgeni Golov
2008-11-22  8:22                                                     ` Tejun Heo
2008-11-22  9:51                                                       ` Evgeni Golov
2008-11-22  9:58                                                       ` Evgeni Golov
2008-11-23 18:09                                                       ` Elias Oltmanns
2008-11-24  4:20                                                         ` 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=49265812.3050902@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=eo@nebensachen.de \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=sargentd@die-welt.net \
    /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).