diff options
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 2663ddbd9b67..ae7eb58d961c 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -179,26 +179,16 @@ static int slc90e66_config_drive_for_dma (ide_drive_t *drive) | |||
179 | 179 | ||
180 | static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) | 180 | static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) |
181 | { | 181 | { |
182 | ide_hwif_t *hwif = HWIF(drive); | ||
183 | struct hd_driveid *id = drive->id; | ||
184 | |||
185 | drive->init_speed = 0; | 182 | drive->init_speed = 0; |
186 | 183 | ||
187 | if ((id->capability & 1) && drive->autodma) { | 184 | if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive)) |
188 | 185 | return 0; | |
189 | if (ide_use_dma(drive) && slc90e66_config_drive_for_dma(drive)) | ||
190 | return hwif->ide_dma_on(drive); | ||
191 | 186 | ||
192 | goto fast_ata_pio; | 187 | if (ide_use_fast_pio(drive)) |
188 | (void)slc90e66_tune_chipset(drive, XFER_PIO_0 + | ||
189 | ide_get_best_pio_mode(drive, 255, 4, NULL)); | ||
193 | 190 | ||
194 | } else if ((id->capability & 8) || (id->field_valid & 2)) { | 191 | return -1; |
195 | fast_ata_pio: | ||
196 | (void) hwif->speedproc(drive, XFER_PIO_0 + | ||
197 | ide_get_best_pio_mode(drive, 255, 4, NULL)); | ||
198 | return hwif->ide_dma_off_quietly(drive); | ||
199 | } | ||
200 | /* IORDY not supported */ | ||
201 | return 0; | ||
202 | } | 192 | } |
203 | 193 | ||
204 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | 194 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) |