Re: 2.6.18 - AHCI detection pauses excessively

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

 



On Wed, Nov 15, 2006 at 11:22:23AM -0700, Berck E. Nash wrote:
> Tejun Heo wrote:
> >Hmmm.. Can you try with the attached patch applied?  Also, please turn 
> >on kernel config 'Kernel Hacking -> Show timing info on printks' and 
> >report boot dmesg.
> 
> Looks like you forgot to attach the patch, so I couldn't test it:) 
> Here's the section with the annoying hang with timing info.  I noticed 
> that there are similar messages repeated later, but without as much 
> hang, so I've attached the entire dmesg as well, in case it's of any help.

Yeah, I did and forgot about this thread too.  Sorry.  This is on the
top of my to-do list now.  I'm attaching the patch.  TIA.

-- 
tejun
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3fd7c79..89aa449 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2669,20 +2669,26 @@ int sata_phy_debounce(struct ata_port *a
 
 		/* DET stable? */
 		if (cur == last) {
+			printk("SATA PHY: stable DET=%x\n", cur);
 			if (cur == 1 && time_before(jiffies, timeout))
 				continue;
-			if (time_after(jiffies, last_jiffies + duration))
+			if (time_after(jiffies, last_jiffies + duration)) {
+				printk("SATA PHY: debounced\n");
 				return 0;
+			}
 			continue;
 		}
 
+		printk("SATA PHY: unstable DET=%x->%x\n", last, cur);
 		/* unstable, start over */
 		last = cur;
 		last_jiffies = jiffies;
 
 		/* check timeout */
-		if (time_after(jiffies, timeout))
+		if (time_after(jiffies, timeout)) {
+			printk("SATA PHY: failed to debounce\n");
 			return -EBUSY;
+		}
 	}
 }
 
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 9080789..8220ca3 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -689,10 +689,11 @@ extern const struct ata_port_operations
 static inline const unsigned long *
 sata_ehc_deb_timing(struct ata_eh_context *ehc)
 {
-	if (ehc->i.flags & ATA_EHI_HOTPLUGGED)
+/*	if (ehc->i.flags & ATA_EHI_HOTPLUGGED)
 		return sata_deb_timing_hotplug;
 	else
-		return sata_deb_timing_normal;
+		return sata_deb_timing_normal;*/
+	return sata_deb_timing_long;
 }
 
 static inline int ata_port_is_dummy(struct ata_port *ap)

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux