aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/slc90e66.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r--drivers/ide/pci/slc90e66.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 4a1853af3bbb..9be7e49cba0e 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -1,9 +1,10 @@
1/* 1/*
2 * linux/drivers/ide/pci/slc90e66.c Version 0.11 September 11, 2002 2 * linux/drivers/ide/pci/slc90e66.c Version 0.12 May 12, 2006
3 * 3 *
4 * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> 4 * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org>
5 * Copyright (C) 2006 MontaVista Software, Inc. <source@mvista.com>
5 * 6 *
6 * This a look-a-like variation of the ICH0 PIIX4 Ultra-66, 7 * This is a look-alike variation of the ICH0 PIIX4 Ultra-66,
7 * but this keeps the ISA-Bridge and slots alive. 8 * but this keeps the ISA-Bridge and slots alive.
8 * 9 *
9 */ 10 */
@@ -158,10 +159,8 @@ static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
158{ 159{
159 u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive)); 160 u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive));
160 161
161 if (!(speed)) { 162 if (!speed)
162 u8 tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL); 163 return 0;
163 speed = slc90e66_dma_2_pio(XFER_PIO_0 + tspeed);
164 }
165 164
166 (void) slc90e66_tune_chipset(drive, speed); 165 (void) slc90e66_tune_chipset(drive, speed);
167 return ide_dma_enable(drive); 166 return ide_dma_enable(drive);
@@ -176,16 +175,15 @@ static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
176 175
177 if (id && (id->capability & 1) && drive->autodma) { 176 if (id && (id->capability & 1) && drive->autodma) {
178 177
179 if (ide_use_dma(drive)) { 178 if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive))
180 if (slc90e66_config_drive_for_dma(drive)) 179 return hwif->ide_dma_on(drive);
181 return hwif->ide_dma_on(drive);
182 }
183 180
184 goto fast_ata_pio; 181 goto fast_ata_pio;
185 182
186 } else if ((id->capability & 8) || (id->field_valid & 2)) { 183 } else if ((id->capability & 8) || (id->field_valid & 2)) {
187fast_ata_pio: 184fast_ata_pio:
188 hwif->tuneproc(drive, 5); 185 (void) hwif->speedproc(drive, XFER_PIO_0 +
186 ide_get_best_pio_mode(drive, 255, 4, NULL));
189 return hwif->ide_dma_off_quietly(drive); 187 return hwif->ide_dma_off_quietly(drive);
190 } 188 }
191 /* IORDY not supported */ 189 /* IORDY not supported */