]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ide/qd65xx.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[mv-sheeva.git] / drivers / ide / qd65xx.c
index 74696edc8d1dec7e94cb04621a04a782d75aeee4..3f0244fd8e623010433c5086c1656bf812a62fbb 100644 (file)
@@ -189,15 +189,13 @@ static void qd_set_timing (ide_drive_t *drive, u8 timing)
        printk(KERN_DEBUG "%s: %#x\n", drive->name, timing);
 }
 
-static void qd6500_set_pio_mode(ide_drive_t *drive, const u8 pio)
+static void qd6500_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 {
        u16 *id = drive->id;
        int active_time   = 175;
        int recovery_time = 415; /* worst case values from the dos driver */
 
-       /*
-        * FIXME: use "pio" value
-        */
+       /* FIXME: use drive->pio_mode value */
        if (!qd_find_disk_type(drive, &active_time, &recovery_time) &&
            (id[ATA_ID_OLD_PIO_MODES] & 0xff) && (id[ATA_ID_FIELD_VALID] & 2) &&
            id[ATA_ID_EIDE_PIO] >= 240) {
@@ -211,9 +209,9 @@ static void qd6500_set_pio_mode(ide_drive_t *drive, const u8 pio)
                                active_time, recovery_time));
 }
 
-static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio)
+static void qd6580_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 {
-       ide_hwif_t *hwif = drive->hwif;
+       const u8 pio = drive->pio_mode - XFER_PIO_0;
        struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
        unsigned int cycle_time;
        int active_time   = 175;