Skip to contentSkip to conversation

PATCH: Old IDE, fix SATA detection for cabling

PATCH Alan Cox 1 participant 1 message Jun 26, 2006 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

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)

drivers/ide/ide-iops.c +4 -0
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
@@ -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