From: Alan Cox Date: Wed, 28 Jun 2006 11:26:58 +0000 (-0700) Subject: [PATCH] Old IDE, fix SATA detection for cabling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a1276e7b6cba549553285f74e87f702bfff6fac;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] Old IDE, fix SATA detection for cabling 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 97a49e77a8f1..32117f0ec5c0 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -597,6 +597,10 @@ u8 eighty_ninty_three (ide_drive_t *drive) { 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