]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/cmd640.c
Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / cmd640.c
index 7f39cdb414109ece635ba535e49eb5529a0f51f1..e4306647d00d6782e8db72d40d82827bb085044f 100644 (file)
@@ -378,13 +378,13 @@ static void __set_prefetch_mode(ide_drive_t *drive, int mode)
 {
        if (mode) {     /* want prefetch on? */
 #if CMD640_PREFETCH_MASKS
-               drive->no_unmask = 1;
-               drive->unmask = 0;
+               drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
+               drive->dev_flags &= ~IDE_DFLAG_UNMASK;
 #endif
-               drive->no_io_32bit = 0;
+               drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
        } else {
-               drive->no_unmask = 0;
-               drive->no_io_32bit = 1;
+               drive->dev_flags &= ~IDE_DFLAG_NO_UNMASK;
+               drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
                drive->io_32bit = 0;
        }
 }
@@ -468,10 +468,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index)
         */
        if (index > 1) {
                ide_hwif_t *hwif = drive->hwif;
-               ide_drive_t *peer = &hwif->drives[!drive->select.b.unit];
+               ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)];
                unsigned int mate = index ^ 1;
 
-               if (peer->present) {
+               if (peer->dev_flags & IDE_DFLAG_PRESENT) {
                        if (setup_count < setup_counts[mate])
                                setup_count = setup_counts[mate];
                        if (active_count < active_counts[mate])
@@ -607,7 +607,7 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio)
 
 static void cmd640_init_dev(ide_drive_t *drive)
 {
-       unsigned int i = drive->hwif->channel * 2 + drive->select.b.unit;
+       unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1);
 
 #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
        /*
@@ -626,7 +626,7 @@ static void cmd640_init_dev(ide_drive_t *drive)
         */
        check_prefetch(drive, i);
        printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n",
-                                 i, drive->no_io_32bit ? "off" : "on");
+               i, (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) ? "off" : "on");
 #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
 }