diff options
-rw-r--r-- | drivers/ide/ide-iops.c | 3 | ||||
-rw-r--r-- | include/linux/ide.h | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index f4cd2700cae5..646a54e233d3 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive) | |||
615 | if (hwif->cbl != ATA_CBL_PATA80 && !ivb) | 615 | if (hwif->cbl != ATA_CBL_PATA80 && !ivb) |
616 | goto no_80w; | 616 | goto no_80w; |
617 | 617 | ||
618 | /* Check for SATA but only if we are ATA5 or higher */ | 618 | if (ide_dev_is_sata(id)) |
619 | if (id->hw_config == 0 && (id->major_rev_num & 0x7FE0)) | ||
620 | return 1; | 619 | return 1; |
621 | 620 | ||
622 | /* | 621 | /* |
diff --git a/include/linux/ide.h b/include/linux/ide.h index c792b4fd1588..b9f66c10caa0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) | |||
1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; | 1378 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; |
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | static inline int ide_dev_is_sata(struct hd_driveid *id) | ||
1382 | { | ||
1383 | /* | ||
1384 | * See if word 93 is 0 AND drive is at least ATA-5 compatible | ||
1385 | * verifying that word 80 by casting it to a signed type -- | ||
1386 | * this trick allows us to filter out the reserved values of | ||
1387 | * 0x0000 and 0xffff along with the earlier ATA revisions... | ||
1388 | */ | ||
1389 | if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020) | ||
1390 | return 1; | ||
1391 | return 0; | ||
1392 | } | ||
1393 | |||
1381 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1394 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1382 | 1395 | ||
1383 | typedef struct ide_pio_timings_s { | 1396 | typedef struct ide_pio_timings_s { |