]> err.no Git - linux-2.6/commitdiff
ide: remove ide_use_fast_pio()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 16 Oct 2007 20:29:54 +0000 (22:29 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 16 Oct 2007 20:29:54 +0000 (22:29 +0200)
Remove ide_use_fast_pio() and just re-tune PIO unconditionally if DMA tuning
has failed in ->ide_dma_check.  All host drivers using ide_use_fast_pio() set
drive->autotune so PIO is always tuned anyway and in some cases we _really_
need to re-tune PIO because PIO and DMA timings are shared.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 files changed:
drivers/ide/ide-lib.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
include/linux/ide.h

index 0e2562f0f74ec55f8455b04f322ba866cea8a06b..af86433baede6c7011d2a24adf39af490bae6be2 100644 (file)
@@ -96,21 +96,6 @@ static u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
        return min(speed, mode);
 }
 
-int ide_use_fast_pio(ide_drive_t *drive)
-{
-       struct hd_driveid *id = drive->id;
-
-       if ((id->capability & 1) && drive->autodma)
-               return 1;
-
-       if ((id->capability & 8) || (id->field_valid & 2))
-               return 1;
-
-       return 0;
-}
-
-EXPORT_SYMBOL_GPL(ide_use_fast_pio);
-
 /*
  * Standard (generic) timings for PIO modes, from ATA2 specification.
  * These timings are for access to the IDE data port register *only*.
index 2e82ef5460076579ae5d80d21d5b3022a5c19c25..91bf5beba5ce8d72e52348f9fa11bd966440a95e 100644 (file)
@@ -146,8 +146,7 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 644f4aea795a42fd69d44875d85a3975d0fb3712..b457df883dcb7cbef6ae2be948e3ca734772dd65 100644 (file)
@@ -171,8 +171,7 @@ static int atiixp_dma_check(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index d50f15e34b80fb6a63fc6997a89074b59509145a..52790cb6bce4173b6c981d6bdb1ebc2fbfa3f22d 100644 (file)
@@ -335,8 +335,7 @@ static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 896cc9211bd3efc21db67c0c2472771fe63cccd0..2a72b4f22ddfaf8f5d0b7669c9c479f9e3ccad39 100644 (file)
@@ -162,8 +162,7 @@ static int cs5535_dma_check(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index bccf0667a732a5944ab83613f3c1392d9028c7d3..69724887225c38a08a60e243057ab45b08af4e1b 100644 (file)
@@ -85,8 +85,7 @@ static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return -1;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index a8097b5476a26d40278053a04446866bdb70111b..992b60eeee3f9858787b46dcbdc417aa0fb9bbaa 100644 (file)
@@ -718,8 +718,7 @@ static int hpt366_config_drive_xfer_rate(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index c3a751207e649314b0812e6d4b902cddbc9dc5e2..9767232e2f8ae3625f62501d0b6cbfa26952e60d 100644 (file)
@@ -228,8 +228,7 @@ static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 9847a4ff7d40d4a439ed18b960c9eadf428020f0..b2c7b6e3edd53105600255630acbdbf01cb7aa83 100644 (file)
@@ -184,8 +184,7 @@ static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 4dd1b6d0acb5414c347ae1e5f4a7257da3212c95..dcb0701f10b5e0da56b6d1caed11cf3ac521b3dc 100644 (file)
@@ -267,8 +267,7 @@ static int piix_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 67f06dd11b341c7a840b9b3e5b95d6563c3e4326..f839bdeb903b0e75b9f653a376154de9b1304abc 100644 (file)
@@ -299,8 +299,7 @@ static int scc_config_drive_for_dma(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index b7076f4569a4233e5bd45fabd2f831f186ba4045..4666e4c1597bdcc492fa023763b2f71bec0e8059 100644 (file)
@@ -201,8 +201,7 @@ static int svwks_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index ce7784996d12c09c747ecc11af7f3789649a2cae..8be36f3b69a8d514c4f371b760298e92a25f5501 100644 (file)
@@ -326,8 +326,7 @@ static int siimage_config_drive_for_dma (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 99fe0b6827245436eca37d92fcc90c37edd0bcb2..5458c56e69b0f4756b97bec0a0f8f249d0ab603c 100644 (file)
@@ -606,8 +606,7 @@ static int sis5513_config_xfer_rate(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 38da0659ec07c0f970cbfd6c561fc280b447ae62..41c5c571f6bdf70f1170491307c98e21ea453444 100644 (file)
@@ -135,8 +135,7 @@ static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 840415d68d38e56482e24f5e9a61809d12db7a56..e66e7883ebe2c72ec95f494fc5ef212a159c3f78 100644 (file)
@@ -167,8 +167,7 @@ static int tc86c001_config_drive_xfer_rate(ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       if (ide_use_fast_pio(drive))
-               ide_set_max_pio(drive);
+       ide_set_max_pio(drive);
 
        return -1;
 }
index 30a1931466a615983ce504417a91bdc481dc79e9..86c5907db2a436133ca0d32b09a3c41efb57e16e 100644 (file)
@@ -1380,7 +1380,6 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
 extern char *ide_xfer_verbose(u8 xfer_rate);
 extern void ide_toggle_bounce(ide_drive_t *drive, int on);
 extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
-int ide_use_fast_pio(ide_drive_t *);
 
 static inline int ide_dev_has_iordy(struct hd_driveid *id)
 {