diff options
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 7beaf1e9be12..3cf59f2c3928 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -819,6 +819,26 @@ int ide_set_dma(ide_drive_t *drive) | |||
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | 821 | ||
822 | void ide_check_dma_crc(ide_drive_t *drive) | ||
823 | { | ||
824 | u8 mode; | ||
825 | |||
826 | ide_dma_off_quietly(drive); | ||
827 | drive->crc_count = 0; | ||
828 | mode = drive->current_speed; | ||
829 | /* | ||
830 | * Don't try non Ultra-DMA modes without iCRC's. Force the | ||
831 | * device to PIO and make the user enable SWDMA/MWDMA modes. | ||
832 | */ | ||
833 | if (mode > XFER_UDMA_0 && mode <= XFER_UDMA_7) | ||
834 | mode--; | ||
835 | else | ||
836 | mode = XFER_PIO_4; | ||
837 | ide_set_xfer_rate(drive, mode); | ||
838 | if (drive->current_speed >= XFER_SW_DMA_0) | ||
839 | ide_dma_on(drive); | ||
840 | } | ||
841 | |||
822 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 842 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
823 | void ide_dma_lost_irq (ide_drive_t *drive) | 843 | void ide_dma_lost_irq (ide_drive_t *drive) |
824 | { | 844 | { |