diff options
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 41a128f52112..957618849540 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -79,7 +79,7 @@ EXPORT_SYMBOL(ide_xfer_verbose); | |||
79 | * TODO: check device PIO capabilities | 79 | * TODO: check device PIO capabilities |
80 | */ | 80 | */ |
81 | 81 | ||
82 | u8 ide_rate_filter(ide_drive_t *drive, u8 speed) | 82 | static u8 ide_rate_filter(ide_drive_t *drive, u8 speed) |
83 | { | 83 | { |
84 | ide_hwif_t *hwif = drive->hwif; | 84 | ide_hwif_t *hwif = drive->hwif; |
85 | u8 mode = ide_find_dma_mode(drive, speed); | 85 | u8 mode = ide_find_dma_mode(drive, speed); |
@@ -96,8 +96,6 @@ u8 ide_rate_filter(ide_drive_t *drive, u8 speed) | |||
96 | return min(speed, mode); | 96 | return min(speed, mode); |
97 | } | 97 | } |
98 | 98 | ||
99 | EXPORT_SYMBOL(ide_rate_filter); | ||
100 | |||
101 | int ide_use_fast_pio(ide_drive_t *drive) | 99 | int ide_use_fast_pio(ide_drive_t *drive) |
102 | { | 100 | { |
103 | struct hd_driveid *id = drive->id; | 101 | struct hd_driveid *id = drive->id; |
@@ -364,13 +362,14 @@ void ide_toggle_bounce(ide_drive_t *drive, int on) | |||
364 | 362 | ||
365 | int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) | 363 | int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) |
366 | { | 364 | { |
367 | #ifndef CONFIG_BLK_DEV_IDEDMA | 365 | ide_hwif_t *hwif = drive->hwif; |
368 | rate = min(rate, (u8) XFER_PIO_4); | 366 | |
369 | #endif | 367 | if (hwif->speedproc == NULL) |
370 | if(HWIF(drive)->speedproc) | ||
371 | return HWIF(drive)->speedproc(drive, rate); | ||
372 | else | ||
373 | return -1; | 368 | return -1; |
369 | |||
370 | rate = ide_rate_filter(drive, rate); | ||
371 | |||
372 | return hwif->speedproc(drive, rate); | ||
374 | } | 373 | } |
375 | 374 | ||
376 | static void ide_dump_opcode(ide_drive_t *drive) | 375 | static void ide_dump_opcode(ide_drive_t *drive) |