diff options
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index f28fabb791fe..5fe85191d49c 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -779,6 +779,26 @@ u8 ide_max_dma_mode(ide_drive_t *drive) | |||
779 | 779 | ||
780 | EXPORT_SYMBOL_GPL(ide_max_dma_mode); | 780 | EXPORT_SYMBOL_GPL(ide_max_dma_mode); |
781 | 781 | ||
782 | int ide_tune_dma(ide_drive_t *drive) | ||
783 | { | ||
784 | u8 speed; | ||
785 | |||
786 | /* TODO: use only ide_max_dma_mode() */ | ||
787 | if (!ide_use_dma(drive)) | ||
788 | return 0; | ||
789 | |||
790 | speed = ide_max_dma_mode(drive); | ||
791 | |||
792 | if (!speed) | ||
793 | return 0; | ||
794 | |||
795 | drive->hwif->speedproc(drive, speed); | ||
796 | |||
797 | return ide_dma_enable(drive); | ||
798 | } | ||
799 | |||
800 | EXPORT_SYMBOL_GPL(ide_tune_dma); | ||
801 | |||
782 | void ide_dma_verbose(ide_drive_t *drive) | 802 | void ide_dma_verbose(ide_drive_t *drive) |
783 | { | 803 | { |
784 | struct hd_driveid *id = drive->id; | 804 | struct hd_driveid *id = drive->id; |