diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-03-31 14:15:27 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:27 -0400 |
commit | 8d64fcd9357798ad0d61f8877de13d5e1b1ab510 (patch) | |
tree | 7e0737ef385b80faf9fa3f5d0c1df1f22254d0d8 /drivers/ide/ide-dma-sff.c | |
parent | 985232e388714d4a9e94b4d96ee69b6ff8c9dc31 (diff) |
ide: identify data word 53 bit 1 doesn't cover words 62 and 63 (take 3)
The IDE code assumed for years that the bit 1 of the identify data word 53 also
covers the validity of the SW/MW DMA information in words 62 and 63, but it has
always covered only words 64 thru 70, with words 62 and 63 being defined in the
original ATA spec, not in ATA-2...
This fix however should only concern *very* old hard disks and rather old CF
cards...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma-sff.c')
-rw-r--r-- | drivers/ide/ide-dma-sff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-dma-sff.c b/drivers/ide/ide-dma-sff.c index f8c7d0cd2ff8..16fc46edc32d 100644 --- a/drivers/ide/ide-dma-sff.c +++ b/drivers/ide/ide-dma-sff.c | |||
@@ -38,10 +38,9 @@ int config_drive_for_dma(ide_drive_t *drive) | |||
38 | * Enable DMA on any drive that has mode2 DMA | 38 | * Enable DMA on any drive that has mode2 DMA |
39 | * (multi or single) enabled | 39 | * (multi or single) enabled |
40 | */ | 40 | */ |
41 | if (id[ATA_ID_FIELD_VALID] & 2) /* regular DMA */ | 41 | if ((id[ATA_ID_MWDMA_MODES] & 0x404) == 0x404 || |
42 | if ((id[ATA_ID_MWDMA_MODES] & 0x404) == 0x404 || | 42 | (id[ATA_ID_SWDMA_MODES] & 0x404) == 0x404) |
43 | (id[ATA_ID_SWDMA_MODES] & 0x404) == 0x404) | 43 | return 1; |
44 | return 1; | ||
45 | 44 | ||
46 | /* Consult the list of known "good" drives */ | 45 | /* Consult the list of known "good" drives */ |
47 | if (ide_dma_good_drive(drive)) | 46 | if (ide_dma_good_drive(drive)) |