]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/slc90e66.c
ide: add short cables support
[linux-2.6] / drivers / ide / pci / slc90e66.c
index 9e95a5cbf984c9789b855db62cafbb8cc2332302..575dbbd8b482edb345960fc5e56ecbf87ed39693 100644 (file)
@@ -160,22 +160,11 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
        return ide_config_drive_speed(drive, speed);
 }
 
-static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
-{
-       u8 speed = ide_max_dma_mode(drive);
-
-       if (!speed)
-               return 0;
-
-       (void) slc90e66_tune_chipset(drive, speed);
-       return ide_dma_enable(drive);
-}
-
 static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
 {
        drive->init_speed = 0;
 
-       if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive))
+       if (ide_tune_dma(drive))
                return 0;
 
        if (ide_use_fast_pio(drive))
@@ -210,10 +199,9 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
        hwif->mwdma_mask = 0x06;
        hwif->swdma_mask = 0x04;
 
-       if (!hwif->udma_four) {
+       if (hwif->cbl != ATA_CBL_PATA40_SHORT)
                /* bit[0(1)]: 0:80, 1:40 */
-               hwif->udma_four = (reg47 & mask) ? 0 : 1;
-       }
+               hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
 
        hwif->ide_dma_check = &slc90e66_config_drive_xfer_rate;