Re: sata-sil drive detection issues.

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

 



Hello,

On Thu, Feb 17, 2011 at 03:23:13PM +1100, Steven Haigh wrote:
> I might have acted a bit prematurely on this. After booting off the
> CentOS 5.5 installation DVD, I noticed that the esata drive at the
> same problem. After lots of cable swapping and testing, I have found
> that the esata cable may be faulty as a direct SATA -> drive
> connection works perfectly.
> 
> I am unsure however why my previous test of plugging the esata drive
> directly to the onboard SATA controller worked - however now this
> also fails.
> 
> I shall attempt to try some different eSATA cables and report back
> if I manage to isolate the issue directly to the sata_sil module.

It's probably dependent on timing and not completely reliable.  It's
rather complicated.  The AC_ERR_NODEV_HINT thing is there primarily
for PATA controllers so that they don't spend time trying to probe
empty ports.

Does the following patch resolve the problem?

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d4e52e2..d08383f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1908,7 +1908,13 @@ retry:
 		err_mask = ata_do_dev_read_id(dev, &tf, id);
 
 	if (err_mask) {
-		if (err_mask & AC_ERR_NODEV_HINT) {
+		/*
+		 * AC_ERR_NODEV_HINT is primarily used to detect empty PATA
+		 * ports.  Some SATA devices incorrectly trigger it.
+		 * Ignore if the physical link is positively online.
+		 */
+		if ((err_mask & AC_ERR_NODEV_HINT) &&
+		    !ata_phys_link_online(ata_dev_phys_link(dev))) {
 			ata_dev_printk(dev, KERN_DEBUG,
 				       "NODEV after polling detection\n");
 			return -ENOENT;


-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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