diff options
Diffstat (limited to 'drivers/ide/pci/cmd640.c')
-rw-r--r-- | drivers/ide/pci/cmd640.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 7f39cdb41410..e4306647d00d 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -378,13 +378,13 @@ static void __set_prefetch_mode(ide_drive_t *drive, int mode) | |||
378 | { | 378 | { |
379 | if (mode) { /* want prefetch on? */ | 379 | if (mode) { /* want prefetch on? */ |
380 | #if CMD640_PREFETCH_MASKS | 380 | #if CMD640_PREFETCH_MASKS |
381 | drive->no_unmask = 1; | 381 | drive->dev_flags |= IDE_DFLAG_NO_UNMASK; |
382 | drive->unmask = 0; | 382 | drive->dev_flags &= ~IDE_DFLAG_UNMASK; |
383 | #endif | 383 | #endif |
384 | drive->no_io_32bit = 0; | 384 | drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT; |
385 | } else { | 385 | } else { |
386 | drive->no_unmask = 0; | 386 | drive->dev_flags &= ~IDE_DFLAG_NO_UNMASK; |
387 | drive->no_io_32bit = 1; | 387 | drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT; |
388 | drive->io_32bit = 0; | 388 | drive->io_32bit = 0; |
389 | } | 389 | } |
390 | } | 390 | } |
@@ -468,10 +468,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index) | |||
468 | */ | 468 | */ |
469 | if (index > 1) { | 469 | if (index > 1) { |
470 | ide_hwif_t *hwif = drive->hwif; | 470 | ide_hwif_t *hwif = drive->hwif; |
471 | ide_drive_t *peer = &hwif->drives[!drive->select.b.unit]; | 471 | ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)]; |
472 | unsigned int mate = index ^ 1; | 472 | unsigned int mate = index ^ 1; |
473 | 473 | ||
474 | if (peer->present) { | 474 | if (peer->dev_flags & IDE_DFLAG_PRESENT) { |
475 | if (setup_count < setup_counts[mate]) | 475 | if (setup_count < setup_counts[mate]) |
476 | setup_count = setup_counts[mate]; | 476 | setup_count = setup_counts[mate]; |
477 | if (active_count < active_counts[mate]) | 477 | if (active_count < active_counts[mate]) |
@@ -607,7 +607,7 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
607 | 607 | ||
608 | static void cmd640_init_dev(ide_drive_t *drive) | 608 | static void cmd640_init_dev(ide_drive_t *drive) |
609 | { | 609 | { |
610 | unsigned int i = drive->hwif->channel * 2 + drive->select.b.unit; | 610 | unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); |
611 | 611 | ||
612 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED | 612 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED |
613 | /* | 613 | /* |
@@ -626,7 +626,7 @@ static void cmd640_init_dev(ide_drive_t *drive) | |||
626 | */ | 626 | */ |
627 | check_prefetch(drive, i); | 627 | check_prefetch(drive, i); |
628 | printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n", | 628 | printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n", |
629 | i, drive->no_io_32bit ? "off" : "on"); | 629 | i, (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) ? "off" : "on"); |
630 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ | 630 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ |
631 | } | 631 | } |
632 | 632 | ||