aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 18c78ad2b31e..9d6dabbbf809 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -755,6 +755,7 @@ EXPORT_SYMBOL_GPL(ide_find_dma_mode);
755 755
756static int ide_tune_dma(ide_drive_t *drive) 756static int ide_tune_dma(ide_drive_t *drive)
757{ 757{
758 ide_hwif_t *hwif = drive->hwif;
758 u8 speed; 759 u8 speed;
759 760
760 if (noautodma || drive->nodma || (drive->id->capability & 1) == 0) 761 if (noautodma || drive->nodma || (drive->id->capability & 1) == 0)
@@ -767,15 +768,21 @@ static int ide_tune_dma(ide_drive_t *drive)
767 if (ide_id_dma_bug(drive)) 768 if (ide_id_dma_bug(drive))
768 return 0; 769 return 0;
769 770
770 if (drive->hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) 771 if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA)
771 return config_drive_for_dma(drive); 772 return config_drive_for_dma(drive);
772 773
773 speed = ide_max_dma_mode(drive); 774 speed = ide_max_dma_mode(drive);
774 775
775 if (!speed) 776 if (!speed) {
776 return 0; 777 /* is this really correct/needed? */
778 if ((hwif->host_flags & IDE_HFLAG_CY82C693) &&
779 ide_dma_good_drive(drive))
780 return 1;
781 else
782 return 0;
783 }
777 784
778 if (drive->hwif->host_flags & IDE_HFLAG_NO_SET_MODE) 785 if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
779 return 0; 786 return 0;
780 787
781 if (ide_set_dma_mode(drive, speed)) 788 if (ide_set_dma_mode(drive, speed))