ide: add missing ide_rate_filter() calls to ->speedproc()-s
[firefly-linux-kernel-4.4.55.git] / drivers / ide / mips / au1xxx-ide.c
index 2e7013a2a7f635073eefef53498a54698e095fe5..0d5e4c67fa54ae126f6047309683280930f9510f 100644 (file)
@@ -106,7 +106,7 @@ static void auide_tune_drive(ide_drive_t *drive, byte pio)
        u8 speed;
 
        /* get the best pio mode for the drive */
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
        printk(KERN_INFO "%s: setting Au1XXX IDE to PIO mode%d\n",
               drive->name, pio);
@@ -180,6 +180,8 @@ static int auide_tune_chipset (ide_drive_t *drive, u8 speed)
        int mem_sttime;
        int mem_stcfg;
 
+       speed = ide_rate_filter(drive, speed);
+
        mem_sttime = 0;
        mem_stcfg  = au_readl(MEM_STCFG2);
 
@@ -692,6 +694,8 @@ static int au_ide_probe(struct device *dev)
        hwif->swdma_mask                = 0x0;
 #endif
 
+       hwif->pio_mask = ATA_PIO4;
+
        hwif->noprobe = 0;
        hwif->drives[0].unmask          = 1;
        hwif->drives[1].unmask          = 1;