Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
[linux-2.6-microblaze.git] / drivers / ide / slc90e66.c
index f55d7d6..1ccfb40 100644 (file)
@@ -44,7 +44,7 @@ static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio)
                control |= 1;   /* Programmable timing on */
        if (drive->media == ide_disk)
                control |= 4;   /* Prefetch, post write */
-       if (pio > 2)
+       if (ide_pio_need_iordy(drive, pio))
                control |= 2;   /* IORDY */
        if (is_slave) {
                master_data |=  0x4000;
@@ -91,8 +91,7 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed)
 
                if (!(reg48 & u_flag))
                        pci_write_config_word(dev, 0x48, reg48|u_flag);
-               /* FIXME: (reg4a & a_speed) ? */
-               if ((reg4a & u_speed) != u_speed) {
+               if ((reg4a & a_speed) != u_speed) {
                        pci_write_config_word(dev, 0x4a, reg4a & ~a_speed);
                        pci_read_config_word(dev, 0x4a, &reg4a);
                        pci_write_config_word(dev, 0x4a, reg4a|u_speed);