Re: Odd behaviour of device in response to idleimmediate with unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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 */

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux