]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/triflex.c
ide: move ide_rate_filter() calls to the upper layer (take 2)
[linux-2.6] / drivers / ide / pci / triflex.c
index f8fef905baccdea965b6782e276f9760a2d89880..47cf89be4dfc1422d9603709d2710d08a130e35c 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/ide.h>
 #include <linux/init.h>
 
-static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed)
+static int triflex_tune_chipset(ide_drive_t *drive, const u8 speed)
 {
        ide_hwif_t *hwif = HWIF(drive);
        struct pci_dev *dev = hwif->pci_dev;
@@ -48,7 +48,6 @@ static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed)
        u16 timing = 0;
        u32 triflex_timings = 0;
        u8 unit = (drive->select.b.unit & 0x01);
-       u8 speed = ide_rate_filter(drive, xferspeed);
        
        pci_read_config_dword(dev, channel_offset, &triflex_timings);
        
@@ -115,6 +114,9 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
        hwif->tuneproc = &triflex_tune_drive;
        hwif->speedproc = &triflex_tune_chipset;
 
+       if (hwif->dma_base == 0)
+               return;
+
        hwif->atapi_dma  = 1;
        hwif->mwdma_mask = 0x07;
        hwif->swdma_mask = 0x07;
@@ -132,6 +134,7 @@ static ide_pci_device_t triflex_device __devinitdata = {
        .autodma        = AUTODMA,
        .enablebits     = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
        .bootable       = ON_BOARD,
+       .pio_mask       = ATA_PIO4,
 };
 
 static int __devinit triflex_init_one(struct pci_dev *dev,