b44: fix IFF_ALLMULTI handling of CAM slots
[firefly-linux-kernel-4.4.55.git] / drivers / ide / ide-iops.c
index 09c30cbf4bd7edeef02abebc40e9e46786fb1976..1ee53a551c3adf6fe6397aea0945c5f1f4cbff20 100644 (file)
@@ -583,6 +583,12 @@ u8 eighty_ninty_three (ide_drive_t *drive)
        if(!(drive->id->hw_config & 0x4000))
                return 0;
 #endif /* CONFIG_IDEDMA_IVB */
+       /*
+        * FIXME:
+        * - change master/slave IDENTIFY order
+        * - force bit13 (80c cable present) check
+        *   (unless the slave device is pre-ATA3)
+        */
        return 1;
 }
 
@@ -753,7 +759,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
 
 #ifdef CONFIG_BLK_DEV_IDEDMA
        if (hwif->ide_dma_check)         /* check if host supports DMA */
-               hwif->ide_dma_host_off(drive);
+               hwif->dma_host_off(drive);
 #endif
 
        /*
@@ -830,9 +836,9 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
 
 #ifdef CONFIG_BLK_DEV_IDEDMA
        if (speed >= XFER_SW_DMA_0)
-               hwif->ide_dma_host_on(drive);
+               hwif->dma_host_on(drive);
        else if (hwif->ide_dma_check)   /* check if host supports DMA */
-               hwif->ide_dma_off_quietly(drive);
+               hwif->dma_off_quietly(drive);
 #endif
 
        switch(speed) {
@@ -1042,12 +1048,12 @@ static void check_dma_crc(ide_drive_t *drive)
 {
 #ifdef CONFIG_BLK_DEV_IDEDMA
        if (drive->crc_count) {
-               (void) HWIF(drive)->ide_dma_off_quietly(drive);
+               drive->hwif->dma_off_quietly(drive);
                ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive));
                if (drive->current_speed >= XFER_SW_DMA_0)
                        (void) HWIF(drive)->ide_dma_on(drive);
        } else
-               (void)__ide_dma_off(drive);
+               ide_dma_off(drive);
 #endif
 }
 
@@ -1088,6 +1094,9 @@ static void pre_reset(ide_drive_t *drive)
        if (HWIF(drive)->pre_reset != NULL)
                HWIF(drive)->pre_reset(drive);
 
+       if (drive->current_speed != 0xff)
+               drive->desired_speed = drive->current_speed;
+       drive->current_speed = 0xff;
 }
 
 /*