aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cmd64x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r--drivers/ide/pci/cmd64x.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 0b568c60f926..d50f15e34b80 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -280,10 +280,9 @@ static void cmd64x_set_pio_mode(ide_drive_t *drive, const u8 pio)
280 return; 280 return;
281 281
282 cmd64x_tune_pio(drive, pio); 282 cmd64x_tune_pio(drive, pio);
283 (void) ide_config_drive_speed(drive, XFER_PIO_0 + pio);
284} 283}
285 284
286static int cmd64x_tune_chipset(ide_drive_t *drive, const u8 speed) 285static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)
287{ 286{
288 ide_hwif_t *hwif = HWIF(drive); 287 ide_hwif_t *hwif = HWIF(drive);
289 struct pci_dev *dev = hwif->pci_dev; 288 struct pci_dev *dev = hwif->pci_dev;
@@ -324,13 +323,11 @@ static int cmd64x_tune_chipset(ide_drive_t *drive, const u8 speed)
324 program_cycle_times(drive, 480, 215); 323 program_cycle_times(drive, 480, 215);
325 break; 324 break;
326 default: 325 default:
327 return 1; 326 return;
328 } 327 }
329 328
330 if (speed >= XFER_SW_DMA_0) 329 if (speed >= XFER_SW_DMA_0)
331 (void) pci_write_config_byte(dev, pciU, regU); 330 (void) pci_write_config_byte(dev, pciU, regU);
332
333 return ide_config_drive_speed(drive, speed);
334} 331}
335 332
336static int cmd64x_config_drive_for_dma (ide_drive_t *drive) 333static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
@@ -524,7 +521,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
524 pci_read_config_byte(dev, PCI_REVISION_ID, &rev); 521 pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
525 522
526 hwif->set_pio_mode = &cmd64x_set_pio_mode; 523 hwif->set_pio_mode = &cmd64x_set_pio_mode;
527 hwif->speedproc = &cmd64x_tune_chipset; 524 hwif->set_dma_mode = &cmd64x_set_dma_mode;
528 525
529 hwif->drives[0].autotune = hwif->drives[1].autotune = 1; 526 hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
530 527