aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 0a2fd3b37ac4..cec744cbbde0 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -647,7 +647,7 @@ u8 eighty_ninty_three (ide_drive_t *drive)
647 return 1; 647 return 1;
648 648
649no_80w: 649no_80w:
650 if (drive->udma33_warned == 1) 650 if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED)
651 return 0; 651 return 0;
652 652
653 printk(KERN_WARNING "%s: %s side 80-wire cable detection failed, " 653 printk(KERN_WARNING "%s: %s side 80-wire cable detection failed, "
@@ -655,7 +655,7 @@ no_80w:
655 drive->name, 655 drive->name,
656 hwif->cbl == ATA_CBL_PATA80 ? "drive" : "host"); 656 hwif->cbl == ATA_CBL_PATA80 ? "drive" : "host");
657 657
658 drive->udma33_warned = 1; 658 drive->dev_flags |= IDE_DFLAG_UDMA33_WARNED;
659 659
660 return 0; 660 return 0;
661} 661}
@@ -711,7 +711,7 @@ int ide_driveid_update(ide_drive_t *drive)
711 711
712 kfree(id); 712 kfree(id);
713 713
714 if (drive->using_dma && ide_id_dma_bug(drive)) 714 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) && ide_id_dma_bug(drive))
715 ide_dma_off(drive); 715 ide_dma_off(drive);
716 716
717 return 1; 717 return 1;
@@ -790,7 +790,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
790 790
791 skip: 791 skip:
792#ifdef CONFIG_BLK_DEV_IDEDMA 792#ifdef CONFIG_BLK_DEV_IDEDMA
793 if (speed >= XFER_SW_DMA_0 && drive->using_dma) 793 if (speed >= XFER_SW_DMA_0 && (drive->dev_flags & IDE_DFLAG_USING_DMA))
794 hwif->dma_ops->dma_host_set(drive, 1); 794 hwif->dma_ops->dma_host_set(drive, 1);
795 else if (hwif->dma_ops) /* check if host supports DMA */ 795 else if (hwif->dma_ops) /* check if host supports DMA */
796 ide_dma_off_quietly(drive); 796 ide_dma_off_quietly(drive);
@@ -1016,9 +1016,13 @@ static void ide_disk_pre_reset(ide_drive_t *drive)
1016 drive->special.all = 0; 1016 drive->special.all = 0;
1017 drive->special.b.set_geometry = legacy; 1017 drive->special.b.set_geometry = legacy;
1018 drive->special.b.recalibrate = legacy; 1018 drive->special.b.recalibrate = legacy;
1019
1019 drive->mult_count = 0; 1020 drive->mult_count = 0;
1020 if (!drive->keep_settings && !drive->using_dma) 1021
1022 if ((drive->dev_flags & IDE_DFLAG_KEEP_SETTINGS) == 0 &&
1023 (drive->dev_flags & IDE_DFLAG_USING_DMA) == 0)
1021 drive->mult_req = 0; 1024 drive->mult_req = 0;
1025
1022 if (drive->mult_req != drive->mult_count) 1026 if (drive->mult_req != drive->mult_count)
1023 drive->special.b.set_multmode = 1; 1027 drive->special.b.set_multmode = 1;
1024} 1028}
@@ -1030,18 +1034,18 @@ static void pre_reset(ide_drive_t *drive)
1030 if (drive->media == ide_disk) 1034 if (drive->media == ide_disk)
1031 ide_disk_pre_reset(drive); 1035 ide_disk_pre_reset(drive);
1032 else 1036 else
1033 drive->post_reset = 1; 1037 drive->dev_flags |= IDE_DFLAG_POST_RESET;
1034 1038
1035 if (drive->using_dma) { 1039 if (drive->dev_flags & IDE_DFLAG_USING_DMA) {
1036 if (drive->crc_count) 1040 if (drive->crc_count)
1037 ide_check_dma_crc(drive); 1041 ide_check_dma_crc(drive);
1038 else 1042 else
1039 ide_dma_off(drive); 1043 ide_dma_off(drive);
1040 } 1044 }
1041 1045
1042 if (!drive->keep_settings) { 1046 if ((drive->dev_flags & IDE_DFLAG_KEEP_SETTINGS) == 0) {
1043 if (!drive->using_dma) { 1047 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0) {
1044 drive->unmask = 0; 1048 drive->dev_flags &= ~IDE_DFLAG_UNMASK;
1045 drive->io_32bit = 0; 1049 drive->io_32bit = 0;
1046 } 1050 }
1047 return; 1051 return;