diff options
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 4557fc5a3ea3..3be3c69383f2 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -88,8 +88,15 @@ u8 ide_rate_filter(ide_drive_t *drive, u8 speed) | |||
88 | if (hwif->udma_filter) | 88 | if (hwif->udma_filter) |
89 | mask = hwif->udma_filter(drive); | 89 | mask = hwif->udma_filter(drive); |
90 | 90 | ||
91 | if ((mask & 0x78) && (eighty_ninty_three(drive) == 0)) | 91 | /* |
92 | mask &= 0x07; | 92 | * TODO: speed > XFER_UDMA_2 extra check is needed to avoid false |
93 | * cable warning from eighty_ninty_three(), moving ide_rate_filter() | ||
94 | * calls from ->speedproc to core code will make this hack go away | ||
95 | */ | ||
96 | if (speed > XFER_UDMA_2) { | ||
97 | if ((mask & 0x78) && (eighty_ninty_three(drive) == 0)) | ||
98 | mask &= 0x07; | ||
99 | } | ||
93 | 100 | ||
94 | if (mask) | 101 | if (mask) |
95 | mode = fls(mask) - 1 + XFER_UDMA_0; | 102 | mode = fls(mask) - 1 + XFER_UDMA_0; |