diff options
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 05be8fadda7a..60ecdc258c7c 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -736,24 +736,15 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask) | |||
736 | 736 | ||
737 | static int hpt366_config_drive_xfer_rate(ide_drive_t *drive) | 737 | static int hpt366_config_drive_xfer_rate(ide_drive_t *drive) |
738 | { | 738 | { |
739 | ide_hwif_t *hwif = HWIF(drive); | ||
740 | struct hd_driveid *id = drive->id; | ||
741 | |||
742 | drive->init_speed = 0; | 739 | drive->init_speed = 0; |
743 | 740 | ||
744 | if ((id->capability & 1) && drive->autodma) { | 741 | if (ide_use_dma(drive) && config_chipset_for_dma(drive)) |
745 | if (ide_use_dma(drive) && config_chipset_for_dma(drive)) | 742 | return 0; |
746 | return hwif->ide_dma_on(drive); | ||
747 | |||
748 | goto fast_ata_pio; | ||
749 | 743 | ||
750 | } else if ((id->capability & 8) || (id->field_valid & 2)) { | 744 | if (ide_use_fast_pio(drive)) |
751 | fast_ata_pio: | ||
752 | hpt3xx_tune_drive(drive, 255); | 745 | hpt3xx_tune_drive(drive, 255); |
753 | return hwif->ide_dma_off_quietly(drive); | 746 | |
754 | } | 747 | return -1; |
755 | /* IORDY not supported */ | ||
756 | return 0; | ||
757 | } | 748 | } |
758 | 749 | ||
759 | /* | 750 | /* |
@@ -841,7 +832,7 @@ static int hpt374_ide_dma_test_irq(ide_drive_t *drive) | |||
841 | return 0; | 832 | return 0; |
842 | } | 833 | } |
843 | 834 | ||
844 | dma_stat = hwif->INB(hwif->dma_status); | 835 | dma_stat = inb(hwif->dma_status); |
845 | /* return 1 if INTR asserted */ | 836 | /* return 1 if INTR asserted */ |
846 | if (dma_stat & 4) | 837 | if (dma_stat & 4) |
847 | return 1; | 838 | return 1; |
@@ -1391,9 +1382,6 @@ static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase) | |||
1391 | u8 dma_new = 0, dma_old = 0; | 1382 | u8 dma_new = 0, dma_old = 0; |
1392 | unsigned long flags; | 1383 | unsigned long flags; |
1393 | 1384 | ||
1394 | if (!dmabase) | ||
1395 | return; | ||
1396 | |||
1397 | dma_old = hwif->INB(dmabase + 2); | 1385 | dma_old = hwif->INB(dmabase + 2); |
1398 | 1386 | ||
1399 | local_irq_save(flags); | 1387 | local_irq_save(flags); |