Skip to content

Commit

Permalink
[PATCH] Old IDE, fix SATA detection for cabling
Browse files Browse the repository at this point in the history
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 <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 28, 2006
1 parent 1e866f0 commit 1a1276e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a1276e

Please sign in to comment.