diff options
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 0b83443bf250..31d4e50647d5 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -437,26 +437,6 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
437 | } | 437 | } |
438 | 438 | ||
439 | /** | 439 | /** |
440 | * ali15x3_config_drive_for_dma - configure for DMA | ||
441 | * @drive: drive to configure | ||
442 | * | ||
443 | * Configure a drive for DMA operation. If DMA is not possible we | ||
444 | * drop the drive into PIO mode instead. | ||
445 | */ | ||
446 | |||
447 | static int ali15x3_config_drive_for_dma(ide_drive_t *drive) | ||
448 | { | ||
449 | drive->init_speed = 0; | ||
450 | |||
451 | if (ide_tune_dma(drive)) | ||
452 | return 0; | ||
453 | |||
454 | ide_set_max_pio(drive); | ||
455 | |||
456 | return -1; | ||
457 | } | ||
458 | |||
459 | /** | ||
460 | * ali15x3_dma_setup - begin a DMA phase | 440 | * ali15x3_dma_setup - begin a DMA phase |
461 | * @drive: target device | 441 | * @drive: target device |
462 | * | 442 | * |
@@ -680,7 +660,6 @@ static u8 __devinit ata66_ali15x3(ide_hwif_t *hwif) | |||
680 | 660 | ||
681 | static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | 661 | static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) |
682 | { | 662 | { |
683 | hwif->autodma = 0; | ||
684 | hwif->set_pio_mode = &ali_set_pio_mode; | 663 | hwif->set_pio_mode = &ali_set_pio_mode; |
685 | hwif->set_dma_mode = &ali_set_dma_mode; | 664 | hwif->set_dma_mode = &ali_set_dma_mode; |
686 | hwif->udma_filter = &ali_udma_filter; | 665 | hwif->udma_filter = &ali_udma_filter; |
@@ -715,17 +694,10 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
715 | hwif->mwdma_mask = 0x07; | 694 | hwif->mwdma_mask = 0x07; |
716 | hwif->swdma_mask = 0x07; | 695 | hwif->swdma_mask = 0x07; |
717 | 696 | ||
718 | hwif->ide_dma_check = &ali15x3_config_drive_for_dma; | ||
719 | hwif->dma_setup = &ali15x3_dma_setup; | 697 | hwif->dma_setup = &ali15x3_dma_setup; |
720 | 698 | ||
721 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 699 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
722 | hwif->cbl = ata66_ali15x3(hwif); | 700 | hwif->cbl = ata66_ali15x3(hwif); |
723 | |||
724 | if (!noautodma) | ||
725 | hwif->autodma = 1; | ||
726 | |||
727 | hwif->drives[0].autodma = hwif->autodma; | ||
728 | hwif->drives[1].autodma = hwif->autodma; | ||
729 | } | 701 | } |
730 | 702 | ||
731 | /** | 703 | /** |
@@ -836,9 +808,9 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev | |||
836 | } | 808 | } |
837 | 809 | ||
838 | 810 | ||
839 | static struct pci_device_id alim15x3_pci_tbl[] = { | 811 | static const struct pci_device_id alim15x3_pci_tbl[] = { |
840 | { PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 812 | { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), 0 }, |
841 | { PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5228, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 813 | { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), 0 }, |
842 | { 0, }, | 814 | { 0, }, |
843 | }; | 815 | }; |
844 | MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl); | 816 | MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl); |