PATCH: Old IDE, fix SATA detection for cabling

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

 



This is based on the proposed patches flying around but also checks that
the device in question is new enough to have word 93 rather thanb
blindly assuming word 93 == 0 means SATA (see ATA-5, ATA-7)

Signed-off-by: Alan Cox <[email protected]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.17/drivers/ide/ide-iops.c linux-2.6.17/drivers/ide/ide-iops.c
--- linux.vanilla-2.6.17/drivers/ide/ide-iops.c	2006-06-19 17:17:24.000000000 +0100
+++ linux-2.6.17/drivers/ide/ide-iops.c	2006-06-26 14:04:52.101408544 +0100
@@ -597,6 +597,10 @@
 {
 	if(HWIF(drive)->udma_four == 0)
 		return 0;
+		
+	/* Check for SATA but only if we are ATA5 or higher */
+	if (drive->id->hw_config == 0 && (drive->id->major_rev_num & 0x7FE0))
+		return 1;
 	if (!(drive->id->hw_config & 0x6000))
 		return 0;
 #ifndef CONFIG_IDEDMA_IVB

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[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