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.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index d50f15e34b80..f3d3bde8daba 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -330,17 +330,6 @@ static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)
330 (void) pci_write_config_byte(dev, pciU, regU); 330 (void) pci_write_config_byte(dev, pciU, regU);
331} 331}
332 332
333static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
334{
335 if (ide_tune_dma(drive))
336 return 0;
337
338 if (ide_use_fast_pio(drive))
339 ide_set_max_pio(drive);
340
341 return -1;
342}
343
344static int cmd648_ide_dma_end (ide_drive_t *drive) 333static int cmd648_ide_dma_end (ide_drive_t *drive)
345{ 334{
346 ide_hwif_t *hwif = HWIF(drive); 335 ide_hwif_t *hwif = HWIF(drive);
@@ -547,8 +536,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
547 if (dev->device == PCI_DEVICE_ID_CMD_646 && rev < 5) 536 if (dev->device == PCI_DEVICE_ID_CMD_646 && rev < 5)
548 hwif->ultra_mask = 0x00; 537 hwif->ultra_mask = 0x00;
549 538
550 hwif->ide_dma_check = &cmd64x_config_drive_for_dma;
551
552 if (hwif->cbl != ATA_CBL_PATA40_SHORT) 539 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
553 hwif->cbl = ata66_cmd64x(hwif); 540 hwif->cbl = ata66_cmd64x(hwif);
554 541
@@ -572,10 +559,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
572 hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq; 559 hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq;
573 break; 560 break;
574 } 561 }
575
576 if (!noautodma)
577 hwif->autodma = 1;
578 hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma;
579} 562}
580 563
581static int __devinit init_setup_cmd64x(struct pci_dev *dev, ide_pci_device_t *d) 564static int __devinit init_setup_cmd64x(struct pci_dev *dev, ide_pci_device_t *d)
@@ -654,11 +637,11 @@ static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_devic
654 return d.init_setup(dev, &d); 637 return d.init_setup(dev, &d);
655} 638}
656 639
657static struct pci_device_id cmd64x_pci_tbl[] = { 640static const struct pci_device_id cmd64x_pci_tbl[] = {
658 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_643, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 641 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 },
659 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 642 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_646), 1 },
660 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 643 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), 2 },
661 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 644 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), 3 },
662 { 0, }, 645 { 0, },
663}; 646};
664MODULE_DEVICE_TABLE(pci, cmd64x_pci_tbl); 647MODULE_DEVICE_TABLE(pci, cmd64x_pci_tbl);